malta-apollo-srv

1.0.18 • Public • Published

npm version npm downloads npm downloads

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

Package Sidebar

Install

npm i malta-apollo-srv

Weekly Downloads

0

Version

1.0.18

License

MIT

Unpacked Size

64.3 kB

Total Files

42

Last publish

Collaborators

  • fedeghe