Skip to content

Commit

Permalink
fix: unset __runAtMostOnce flag in root schema resolver. (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 authored Mar 4, 2019
1 parent 67e88eb commit 8edcbed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/webiny-api/src/lambda/lambda.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ const createApolloHandler = async (config: Object) => {
schema = applyMiddleware(schema, ...registeredMiddleware);
}

addSchemaLevelResolveFunction(schema, async (root, args, context) => {
addSchemaLevelResolveFunction(schema, async (root, args, context, info) => {
// Make sure we do not block this resolver from processing subsequent requests!
// This is something that is baked into the graphql-tools and cannot be avoided another way.
delete info.operation['__runAtMostOnce'];

// Process `graphql-context` plugins
const ctxPlugins = getPlugins("graphql-context");
for (let i = 0; i < ctxPlugins.length; i++) {
const ctxPlugin = ctxPlugins[i];
Expand Down

0 comments on commit 8edcbed

Please sign in to comment.