@graphql-tools/delegate@10.0.16
Patch Changes
-
33e8146
Thanks @ardatan! - Fail on query planning phase if the query plan is
not successful before the actual execution -
Updated dependencies
[33e8146
]:- @graphql-tools/executor@1.3.0
@graphql-tools/executor@1.3.0
Minor Changes
-
33e8146
Thanks @ardatan! - Ability to create critical errors that prevents
to return a partial resultsimport { CRITICAL_ERROR } from '@graphql-tools/executor' const schema = makeExecutableSchema({ typeDefs: ` type Query { hello: String } `, resolvers: { Query: { hello: () => new GraphQLError('Critical error', { extensions: { [CRITICAL_ERROR]: true } }) } } })
This will prevent to return a partial results and will return an error instead.
const result = await execute({ schema, document: parse(`{ hello }`) }) expect(result).toEqual({ errors: [ { message: 'Critical error' } ], data: null // Instead of { hello: null } })