@graphql-tools/delegate@10.0.10
Patch Changes
-
#6134
a83da08
Thanks @User! - Ignore unmerged fieldsLet's say you have a gateway schema like in the bottom, and
id
is added to the query, only if theage
is 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
fc9c71f
Thanks @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 seeProductList
needs some fields fromProduct
to resolvefirst
@graphql-tools/federation@1.1.35
Patch Changes
-
#6141
cd962c1
Thanks @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!): Node
in all subgraphs but one implementsUser
and the other implementsPost
, the gateway will choose the subgraph that implementsUser
orPost
based 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
04d5431
Thanks @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
a83da08
Thanks @User! - Ignore unmerged fieldsLet's say you have a gateway schema like in the bottom, and
id
is added to the query, only if theage
is 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
fc9c71f
Thanks @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 seeProductList
needs some fields fromProduct
to resolvefirst
-
#6141
cd962c1
Thanks @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!): Node
in all subgraphs but one implementsUser
and the other implementsPost
, the gateway will choose the subgraph that implementsUser
orPost
based 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