@graphql-tools/executor
1.3.12
Patch Changes
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 aAbortSignal
toexecute
.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
- #6750
000a320
Thanks @ardatan ! - dependencies updates:- Updated dependency
@graphql-typed-document-node/core@^3.2.0
↗︎ (from3.2.0
, independencies
) - Added dependency
@whatwg-node/disposablestack@^0.0.5
↗︎ (todependencies
)
- Updated dependency
1.3.6
Patch Changes
- #6662
696a0d5
Thanks @renovate ! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.6.1
↗︎ (from^10.6.0
, independencies
)
- Updated dependency
- Updated dependencies
[
1b24656
]:- @graphql-tools/utils@10.6.2
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
-
#6420
a867bbc
Thanks @ardatan ! -mapAsyncIterator
now acceptsAsyncIterable
-
Updated dependencies [
a867bbc
]:- @graphql-tools/utils@10.3.4
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 } })
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 theoriginalError
property of theGraphQLError
on invalid input. As a result, error codes from theextensions.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 likeundici
throw objects that are notError
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 anError
instance by takingmessage
,stack
,name
andcause
properties. So the user will get the error correctly.
1.2.5
Patch Changes
1.2.4
Patch Changes
1.2.3
Patch Changes
- #6006
a5364eb
Thanks @n1ru4l ! - fix rejecting when canceling async iterable returned from normalized executor
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
- #5913
83c0af0
Thanks @enisdenjo ! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.0.13
↗︎ (from^10.0.8
, independencies
)
- Updated dependency
1.2.0
Minor Changes
1.1.0
Minor Changes
- #5295
b255b62c
Thanks @n1ru4l ! - Ensure errors thrown within scalars serialize function are mapped toError
.
1.0.0
Major Changes
Patch Changes
0.0.20
Patch Changes
0.0.19
Patch Changes
- #5202
05c97eb8
Thanks @ardatan ! - dependencies updates:- Updated dependency
@repeaterjs/repeater@^3.0.4
↗︎ (from3.0.4
, independencies
) - Updated dependency
value-or-promise@^1.0.12
↗︎ (from1.0.12
, independencies
)
- Updated dependency
0.0.18
Patch Changes
0.0.17
Patch Changes
0.0.16
Patch Changes
- #5112
828fbf93
Thanks @renovate ! - dependencies updates:- Updated dependency
@graphql-typed-document-node/core@3.2.0
↗︎ (from3.1.2
, independencies
)
- Updated dependency
0.0.15
Patch Changes
- #5065
77c1002e
Thanks @renovate ! - dependencies updates:- Updated dependency
@graphql-typed-document-node/core@3.1.2
↗︎ (from3.1.1
, independencies
)
- Updated dependency
0.0.14
Patch Changes
- Updated dependencies
[
b5c8f640
]:- @graphql-tools/utils@9.2.1
0.0.13
Patch Changes
0.0.12
Patch Changes
- #4943
a4d36fcc
Thanks @renovate ! - dependencies updates:- Updated dependency
value-or-promise@1.0.12
↗︎ (from1.0.11
, independencies
)
- Updated dependency
- Updated dependencies
[
e3ec35ed
]:- @graphql-tools/utils@9.1.4
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
-
#4814
79e5554b
Thanks @renovate ! - dependencies updates:- Updated dependency
value-or-promise@1.0.11
↗︎ (from1.0.1
, independencies
)
- Updated dependency
-
#4811
185f1e97
Thanks @owenallenaz ! - addtslib
as a dependency
0.0.4
Patch Changes
0.0.3
Patch Changes
-
#4796
80836fa7
Thanks @saihaj ! - dependencies updates:- Added dependency
@repeaterjs/repeater@3.0.4
↗︎ (todependencies
) - Added dependency
value-or-promise@1.0.1
↗︎ (todependencies
)
- Added dependency
-
#4796
80836fa7
Thanks @saihaj ! - get defer stream from graphql-js -
Updated dependencies [
80836fa7
,8f6d3efc
,80836fa7
,80836fa7
,80836fa7
]:- @graphql-tools/utils@9.0.0
0.0.2
Patch Changes
- Updated dependencies
[
f7daf777
]:- @graphql-tools/utils@8.13.1