Releases: ardatan/graphql-tools
July 18, 2024
@graphql-tools/[email protected]
Patch Changes
-
#6356
8094c37
Thanks @enisdenjo! - AggregateError errors are GraphQL located
errorsInstead of transforming the AggregateError itself to a GraphQL located error.
This is because of two reasons:
- AggregateError wont lose the instanceof its class
- Expanding the AggregateError errors will each contain the proper locations
@graphql-tools/[email protected]
Patch Changes
- #6354
97c88a0
Thanks @enisdenjo! - Handle AggregateErrors by expanding them to
result errors
@graphql-tools/[email protected]
Patch Changes
-
#6355
c6d175b
Thanks @ardatan! - Handle errors coming from subgraphs correctly
when a root field is shared by different subgraphs- If subgraph A returns an error for
Query.foo
, and subgraph B returns the data, ignore the
error and keep it for null fields. - If both subgraphs return errors, return them as
AggregateError
then return them to the gateway
result.
- If subgraph A returns an error for
-
Updated dependencies
[8094c37
,
97c88a0
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
July 13, 2024
@graphql-tools/[email protected]
Patch Changes
- #6343
bec6eac
Thanks @renovate! - dependencies updates:- Updated dependency
@graphql-tools/utils@^10.3.2
↗︎
(from^10.3.1
, independencies
)
- Updated dependency
July 13, 2024
@graphql-tools/[email protected]
Patch Changes
-
#6332
7be6930
Thanks @kamilkisiela! - Strip ignored characters when printing
a query in executor-http -
Updated dependencies
[a276ba8
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
July 05, 2024
@graphql-tools/[email protected]
Patch Changes
-
#6325
9792e80
Thanks @ardatan! - Make the executor disposable optional -
Updated dependencies
[9792e80
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
July 05, 2024
@graphql-tools/[email protected]
Patch Changes
-
#6299
b0ffac8
Thanks @EmrysMyrddin! - When proxying the requests to the HTTP
executor, it should return `GraphQLError` instances in `errors` array -
46eab79
Thanks @ardatan! - Fixed potential leak on executor disposal
July 05, 2024
@graphql-tools/[email protected]
Minor Changes
- #6323
cacf20f
Thanks @ardatan! - Implement Symbol.dispose or Symbol.asyncDispose
to make `Executor`s `Disposable`
Patch Changes
- Updated dependencies
[cacf20f
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Minor Changes
- #6323
cacf20f
Thanks @ardatan! - Implement Symbol.dispose or Symbol.asyncDispose
to make `Executor`s `Disposable`
Patch Changes
- Updated dependencies
[cacf20f
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Minor Changes
- #6323
cacf20f
Thanks @ardatan! - Implement Symbol.dispose or Symbol.asyncDispose
to make `Executor`s `Disposable`
Patch Changes
- Updated dependencies
[cacf20f
]:- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Minor Changes
July 03, 2024
@graphql-tools/[email protected]
Patch Changes
July 01, 2024
@graphql-tools/[email protected]
Patch Changes
-
Updated dependencies
[66c99d9
,
74f995f
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-tools/[email protected]
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/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#6293
3f301dc
Thanks @ardatan! - Do not useentryPoints
forMergedTypeConfig
if there is only one -
#6278
66c99d9
Thanks @ardatan! - Exclude@defer
in the subgraph requests -
Updated dependencies
[66c99d9
,
3f301dc
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
-
#6293
3f301dc
Thanks @ardatan! - Do not apply isolation for Mutation fields -
Updated dependencies
[66c99d9
,
74f995f
]:- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
- @graphql-tools/[email protected]
@graphql-tools/[email protected]
Patch Changes
June 21, 2024
@graphql-tools/[email protected]
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' } } })
June 18, 2024
@graphql-tools/[email protected]
Minor Changes
-
#6267
d5dd794
Thanks @EmrysMyrddin! - AdddelayInSeconds
to thefailure
event to give users more control on failure handling. -
#6267
d5dd794
Thanks @EmrysMyrddin! - Add a the ability to start polling with
a delay. This ease the handling of failure handling, allowing to restart the manager and
respecting GraphOS minimum retry delay.
Patch Changes
- #6267
d5dd794
Thanks @EmrysMyrddin! - Fix Supergraph Manager Event Emitter
not calling every listener when at least one has been registered usingonce
method.