diff --git a/docs/settings.md b/docs/settings.md index 9229324..0150938 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -14,11 +14,14 @@ initialize(); If you want to use engine GraphQL monitoring tool: ```js -initialize({ - engine: { - apiKey: 'XXX', - }, -}); +initialize( + {}, + { + engine: { + apiKey: "XXX" + } + } +); ``` ## `ApolloConstructorOptions` @@ -36,11 +39,16 @@ initialize({ // You must not override schema + // Allow custom URI, rather than Meteor.absoluteUrl() + uri: 'http://endpoint:5000/graphql', + + meteorAccounts: true, // You can disable reading the users via Meteor accounts // You can add `schemaDirectives` and `context` without worrying about context update schemaDirectives: { MyCustomDirective, }, - context: async () => ({ + // You get access to db, user, userId inside the resolver. + context: async ({ db, user, userId }) => ({ services }) }, { diff --git a/package.js b/package.js index 0ed2312..9344361 100644 --- a/package.js +++ b/package.js @@ -1,49 +1,49 @@ Package.describe({ - name: 'cultofcoders:apollo', - version: '0.8.1', + name: "cultofcoders:apollo", + version: "0.9.0", // Brief, one-line summary of the package. - summary: 'Meteor & Apollo integration', + summary: "Meteor & Apollo integration", // URL to the Git repository containing the source code for this package. - git: 'https://github.com/cult-of-coders/apollo.git', + git: "https://github.com/cult-of-coders/apollo.git", // By default, Meteor will default to using README.md for documentation. // To avoid submitting documentation, set this field to null. - documentation: 'README.md', + documentation: "README.md" }); Package.onUse(function(api) { - api.versionsFrom('1.3'); - api.use('ecmascript'); - api.use('check'); - api.use('ejson'); - api.use('mongo'); - - api.use('tmeasday:check-npm-versions@0.3.2'); - api.use('cultofcoders:grapher@1.3.10'); - api.use('cultofcoders:grapher-schema-directives@0.1.8'); - api.use('accounts-base', { weak: true }); - - api.mainModule('client/index.js', 'client'); - api.mainModule('server/index.js', 'server'); + api.versionsFrom("1.3"); + api.use("ecmascript"); + api.use("check"); + api.use("ejson"); + api.use("mongo"); + + api.use("tmeasday:check-npm-versions@0.3.2"); + api.use("cultofcoders:grapher@1.3.10"); + api.use("cultofcoders:grapher-schema-directives@0.1.8"); + api.use("accounts-base", { weak: true }); + + api.mainModule("client/index.js", "client"); + api.mainModule("server/index.js", "server"); }); Npm.depends({ - cookie: '0.4.0', + cookie: "0.4.0" }); Package.onTest(function(api) { - api.use('cultofcoders:apollo'); + api.use("cultofcoders:apollo"); var packages = [ - 'ecmascript', - 'accounts-password', - 'cultofcoders:apollo-accounts@3.4.0', - 'mongo', + "ecmascript", + "accounts-password", + "cultofcoders:apollo-accounts@3.4.0", + "mongo" ]; - api.use(['meteortesting:mocha']); + api.use(["meteortesting:mocha"]); api.use(packages); - api.mainModule('__tests__/server.js', 'server'); - api.mainModule('__tests__/client.js', 'client'); + api.mainModule("__tests__/server.js", "server"); + api.mainModule("__tests__/client.js", "client"); });