Skip to content

Commit 75559ba

Browse files
committed
Fix regression on handling GQL schema errors
1 parent 4ddf251 commit 75559ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/exception/exception.normalizer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,10 @@ export class ExceptionNormalizer {
127127
}
128128

129129
const gqlContext =
130-
context && context.getType<ContextKey>() === 'graphql'
130+
context &&
131+
context.getType<ContextKey>() === 'graphql' &&
132+
// schema input validation errors don't create an execution context correctly
133+
!(ex instanceof GraphQLError)
131134
? GqlExecutionContext.create(context as any)
132135
: undefined;
133136

0 commit comments

Comments
 (0)