@graphql-tools/delegate@10.0.10
Patch Changes
-
#6134
a83da08Thanks @User! - Ignore unmerged fieldsLet's say you have a gateway schema like in the bottom, and
idis added to the query, only if theageis requested;# This will be sent as-is { user { name } }
But the following will be transformed;
{ user { name age } }Into
{ user { id name age } }
type Query {
}
type User {
id: ID! # is the key for all services
name: String!
age: Int! # This comes from another service
}-
#6150
fc9c71fThanks @ardatan! - If there are some fields depending on a nested type resolution, wait until it gets resolved then resolve the rest.See packages/federation/test/fixtures/complex-entity-call example for more details.
You can seeProductListneeds some fields fromProductto resolvefirst
@graphql-tools/federation@1.1.35
Patch Changes
-
#6141
cd962c1Thanks @ardatan! - When the gateway receives the query, now it chooses the best root field if there is the same root field in different subgraphs.
For example, if there isnode(id: ID!): Nodein all subgraphs but one implementsUserand the other implementsPost, the gateway will choose the subgraph that implementsUserorPostbased on the query.If there is a unresolvable interface field, it throws.
See this supergraph and the test query to see a real-life example
-
#6143
04d5431Thanks @ardatan! - Implement interface objects support -
Updated dependencies [
a83da08,fc9c71f,cd962c1]:- @graphql-tools/delegate@10.0.10
- @graphql-tools/stitch@9.2.8
@graphql-tools/stitch@9.2.8
Patch Changes
-
#6134
a83da08Thanks @User! - Ignore unmerged fieldsLet's say you have a gateway schema like in the bottom, and
idis added to the query, only if theageis requested;# This will be sent as-is { user { name } }
But the following will be transformed;
{ user { name age } }Into
{ user { id name age } }
type Query {
}
type User {
id: ID! # is the key for all services
name: String!
age: Int! # This comes from another service
}-
#6150
fc9c71fThanks @ardatan! - If there are some fields depending on a nested type resolution, wait until it gets resolved then resolve the rest.See packages/federation/test/fixtures/complex-entity-call example for more details.
You can seeProductListneeds some fields fromProductto resolvefirst -
#6141
cd962c1Thanks @ardatan! - When the gateway receives the query, now it chooses the best root field if there is the same root field in different subgraphs.
For example, if there isnode(id: ID!): Nodein all subgraphs but one implementsUserand the other implementsPost, the gateway will choose the subgraph that implementsUserorPostbased on the query.If there is a unresolvable interface field, it throws.
See this supergraph and the test query to see a real-life example
-
Updated dependencies [
a83da08,fc9c71f]:- @graphql-tools/delegate@10.0.10