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 = ;Maltastart;
a full example can be found here