Skip to Content
GraphQL Tools
Changelogsexecutor

@graphql-tools/executor

1.3.12

Patch Changes

  • Updated dependencies [53bb601, 53bb601]:
    • @graphql-tools/utils@10.7.2

1.3.11

Patch Changes

  • Updated dependencies [4912f19]:
    • @graphql-tools/utils@10.7.1

1.3.10

Patch Changes

  • #6789 2c70d27 Thanks @n1ru4l! - Surpress the “possible EventEmitter memory leak detected.” warning occuring on Node.js when passing a AbortSignal to execute.

    Each execution will now only set up a single listener on the supplied AbortSignal. While the warning is harmless it can be misleading, which is the main motivation of this change.

  • Updated dependencies [2c70d27]:

    • @graphql-tools/utils@10.7.0

1.3.9

Patch Changes

  • Updated dependencies [6a8123b]:
    • @graphql-tools/utils@10.6.4

1.3.8

Patch Changes

  • 020b9e4 Thanks @ardatan! - `AbortSignal` in `GraphQLResolveInfo`, and `AbortSignal` in `ExecutionRequest`

  • Updated dependencies [020b9e4]:

    • @graphql-tools/utils@10.6.3

1.3.7

Patch Changes

1.3.6

Patch Changes

1.3.5

Patch Changes

  • Updated dependencies [1e02935]:
    • @graphql-tools/utils@10.6.1

1.3.4

Patch Changes

  • Updated dependencies [414e404]:
    • @graphql-tools/utils@10.6.0

1.3.3

Patch Changes

  • Updated dependencies [dc5043b]:
    • @graphql-tools/utils@10.5.6

1.3.2

Patch Changes

  • Updated dependencies [cf2ce5e]:
    • @graphql-tools/utils@10.5.5

1.3.1

Patch Changes

1.3.0

Minor Changes

  • 33e8146 Thanks @ardatan! - Ability to create critical errors that prevents to return a partial results

    import { 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 } })

1.2.8

Patch Changes

  • #6306 74f995f Thanks @n1ru4l! - Properly propagate the original error in custom scalars.

    Errors thrown in the parseValue function for custom scalars were not propagated correctly using the originalError property of the GraphQLError on invalid input. As a result, error codes from the extensions.code were not propagated correctly.

  • Updated dependencies [66c99d9]:

    • @graphql-tools/utils@10.2.3

1.2.7

Patch Changes

  • #6280 7dcd0af Thanks @ardatan! - Since the executor is version agnostic, it should respect the schemas created with older versions.

    So if a type resolver returns a type instead of type name which is required since graphql@16, the executor should handle it correctly.

    See the following example:

    // Assume that the following code is executed with `graphql@15` import { execute } from '@graphql-tools/executor' const BarType = new GraphQLObjectType({ name: 'Bar', fields: { bar: { type: GraphQLString, resolve: () => 'bar' } } }) const BazType = new GraphQLObjectType({ name: 'Baz', fields: { baz: { type: GraphQLString, resolve: () => 'baz' } } }) const BarBazType = new GraphQLUnionType({ name: 'BarBaz', types: [BarType, BazType], // This is the resolver that returns the type instead of type name resolveType(obj) { if ('bar' in obj) { return BarType } if ('baz' in obj) { return BazType } } }) const QueryType = new GraphQLObjectType({ name: 'Query', fields: { barBaz: { type: BarBazType, resolve: () => ({ bar: 'bar' }) } } }) const schema = new GraphQLSchema({ query: QueryType }) const result = await execute({ schema, document: parse(/* GraphQL */ ` query { barBaz { ... on Bar { bar } ... on Baz { baz } } } `) }) expect(result).toEqual({ data: { barBaz: { bar: 'bar' } } })

1.2.6

Patch Changes

  • #6038 02dd9ac Thanks @ardatan! - Some libraries like undici throw objects that are not Error instances when the response is tried to parse as JSON but failed. In that case, executor prints an error like below;

    NonErrorThrown: Unexpected error value: {...} at toError (/usr/src/app/node_modules/graphql/jsutils/toError.js:16:7) at locatedError (/usr/src/app/node_modules/graphql/error/locatedError.js:20:46) at /usr/src/app/node_modules/@graphql-tools/executor/cjs/execution/execute.js:330:58 at processTicksAndRejections (node:internal/process/task_queues:95:5) at async /usr/src/app/node_modules/@graphql-tools/executor/cjs/execution/promiseForObject.js:18:35 at async Promise.all (index 0)

    But actually the shape of the object matches the Error interface. In that case, the executor now coerces the object to an Error instance by taking message, stack, name and cause properties. So the user will get the error correctly.

1.2.5

Patch Changes

1.2.4

Patch Changes

1.2.3

Patch Changes

1.2.2

Patch Changes

  • #5965 3e10da6 Thanks @n1ru4l! - revert subscription event source error handling to graphql-js behaviour

  • Updated dependencies [baf3c28]:

    • @graphql-tools/utils@10.1.1

1.2.1

Patch Changes

1.2.0

Minor Changes

1.1.0

Minor Changes

1.0.0

Major Changes

Patch Changes

0.0.20

Patch Changes

0.0.19

Patch Changes

0.0.18

Patch Changes

0.0.17

Patch Changes

0.0.16

Patch Changes

0.0.15

Patch Changes

0.0.14

Patch Changes

  • Updated dependencies [b5c8f640]:
    • @graphql-tools/utils@9.2.1

0.0.13

Patch Changes

0.0.12

Patch Changes

0.0.11

Patch Changes

  • Updated dependencies [904fe770]:
    • @graphql-tools/utils@9.1.3

0.0.10

Patch Changes

  • Updated dependencies [13c24883]:
    • @graphql-tools/utils@9.1.2

0.0.9

Patch Changes

  • Updated dependencies [7411a5e7]:
    • @graphql-tools/utils@9.1.1

0.0.8

Patch Changes

0.0.7

Patch Changes

  • Updated dependencies [c0639dd0]:
    • @graphql-tools/utils@9.1.0

0.0.6

Patch Changes

  • Updated dependencies [d83b1960]:
    • @graphql-tools/utils@9.0.1

0.0.5

Patch Changes

0.0.4

Patch Changes

  • f47f3559 Thanks @ardatan! - Do not push the following result until the latest one consumed

0.0.3

Patch Changes

0.0.2

Patch Changes

  • Updated dependencies [f7daf777]:
    • @graphql-tools/utils@8.13.1

0.0.1

Patch Changes