Skip to content

Commit

Permalink
add option to skip meteor account resolving
Browse files Browse the repository at this point in the history
resolves #49
  • Loading branch information
smeijer committed Jul 10, 2019
1 parent 96c5c56 commit 5a1dff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default function initialize(apolloConfig = {}, meteorApolloConfig = {}) {
function getContextCreator(meteorApolloConfig, initialApolloConfig) {
const {
context: defaultContextResolver,
meteorAccounts,
} = initialApolloConfig;

return async function getContext({ req: request, connection }) {
Expand All @@ -102,8 +103,7 @@ function getContextCreator(meteorApolloConfig, initialApolloConfig) {
: {};

let userContext = {};
if (Package['accounts-base']) {
const loginToken = req.headers['meteor-login-token'] || req.cookies['meteor-login-token'];
if (meteorAccounts !== false && Package['accounts-base']) {
const loginToken =
req.headers['meteor-login-token'] ||
req.cookies['meteor-login-token'] ||
Expand Down

0 comments on commit 5a1dff8

Please sign in to comment.