malta-apollo-srv
v1.0.18
Published
Malta plugin to start apollo server.
Downloads
8
Maintainers
Readme
This plugin is highly experimental, can be used on all files:
Parameters :
- types : a folder (relative to malta execution one) where an index.js will export all needed types
- resolvers : a folder (relative to malta execution one) where an index.js will export all needed resolvers
- context: a path to a file that will export the needed context to be used in Apollo
- port: this is optional, default is 4000
- host: this is optional, default is localhost
Sample usage:
malta app/source/index.html public -plugins=malta-apollo-srv[types:\"graphql/types\",resolvers:\"graphql/resolvers\",context:\"graphql/context\"]
or in the .json file :
"app/source/index.html" : "public -plugins=malta-apollo-srv[types:'graphql/types',resolvers:'graphql/resolvers',context:'graphql/context']"
or in a script :
var Malta = require('malta');
Malta.get().check([
'app/source/index.html',
'public',
'-plugins=malta-apollo-srv[types:\"graphql/types\",resolvers:\"graphql/resolvers\",context:\"graphql/context\"]',
'-options=showPath:false,watchInterval:500,verbose:0'
]).start();
a full example can be found here