github ardatan/graphql-tools release-1715167956869
May 08, 2024

latest releases: release-1731509960802, graphql-tools@9.0.3, @graphql-tools/wrap@10.0.16...
6 months ago

@graphql-tools/delegate@10.0.10

Patch Changes

  • #6134 a83da08 Thanks @User! - Ignore unmerged fields

    Let's say you have a gateway schema like in the bottom, and id is added to the query, only if the age 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 see ProductList needs some fields from Product to resolve first

@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 is node(id: ID!): Node in all subgraphs but one implements User and the other implements Post, the gateway will choose the subgraph that implements User or Post 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 fields

    Let's say you have a gateway schema like in the bottom, and id is added to the query, only if the age 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 see ProductList needs some fields from Product to resolve first

  • #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 is node(id: ID!): Node in all subgraphs but one implements User and the other implements Post, the gateway will choose the subgraph that implements User or Post 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

Don't miss a new graphql-tools release

NewReleases is sending notifications on new releases.