diff --git a/docs/accounts.md b/docs/accounts.md index 1c7da07..f72418b 100644 --- a/docs/accounts.md +++ b/docs/accounts.md @@ -23,7 +23,7 @@ import { initialize } from 'meteor/cultofcoders:apollo'; initialize({}, { // You can configure your default fields to fetch on GraphQL request // This works with Subscription onConnect() - userDefaultFields: { + userFields: { _id: 1, roles: 1, } diff --git a/package.js b/package.js index 7bd7515..0c22031 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'cultofcoders:apollo', - version: '0.7.2', + version: '0.7.3', // Brief, one-line summary of the package. summary: 'Meteor & Apollo integration', // URL to the Git repository containing the source code for this package. diff --git a/server/initialize.js b/server/initialize.js index f51893f..04a9673 100644 --- a/server/initialize.js +++ b/server/initialize.js @@ -17,7 +17,7 @@ export default function initialize(apolloConfig = {}, meteorApolloConfig = {}) { { gui: Meteor.isDevelopment, middlewares: [], - userFields: { + userDefaultFields: { _id: 1, roles: 1, username: 1, @@ -72,10 +72,6 @@ export default function initialize(apolloConfig = {}, meteorApolloConfig = {}) { res.end(); } }); - - return { - server, - }; } function getContextCreator(meteorApolloConfig, defaultContextResolver) { @@ -94,13 +90,10 @@ function getContextCreator(meteorApolloConfig, defaultContextResolver) { } else { let userContext = {}; if (Package['accounts-base']) { - const loginToken = - req.headers['meteor-login-token'] || - req.cookies['meteor-login-token']; - + const loginToken = req.headers['meteor-login-token']; userContext = await getUserForContext( loginToken, - meteorApolloConfig.userDefaultFields + meteorApolloConfig.userFields ); }