Skip to content

Releases: graphql-hive/gateway

January 20, 2025

20 Jan 14:08
9d588b8
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

  • #471 18682e6 Thanks @ardatan! - While creating a delegation request for the subschema, an selection set should be spreaded on the union type field correctly.

    In case of the following schema;

    type Query {
      foo: Foo
    }
    
    union Foo = Bar | Baz
    
    type Bar {
      id: ID!
      name: String
      age: Age
    }
    
    type Age {
      years: Int
      months: Int
    }
    
    type Baz {
      id: ID!
      name: Name
      age: Int
    }
    
    type Name {
      first: String
      last: String
    }

    If the operation is generated as following;

    query {
      foo {
        id
        name
        age {
          years
          months
        }
      }
    }

    It should be spreaded on the union type field correctly as following;

    query {
      foo {
        ... on Bar {
          id
          age {
            years
            months
          }
        }
        ... on Baz {
          id
          name {
            first
            last
          }
        }
      }
    }

@graphql-tools/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Minor Changes

  • #462 9a6ae85 Thanks @enisdenjo! - Point to exact location of syntax error when parsing malformed config files

Patch Changes

@graphql-hive/[email protected]

Major Changes

  • #462 9a6ae85 Thanks @enisdenjo! - Improving Hive's importing capabilities allowing it to parse TypeScript files

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

  • #472 e9f78cd Thanks @ardatan! - RenameObjectFieldArguments should transform the passed args in delegationContext.

    When a subschema's a root field argument is renamed, the passed arguments should be also transformed;

    type Query {
      # This is the original field
      book(book_id: ID): [Book]
    }
    
    type Book {
      id: ID
      title: String
    }

    When the subschema above is transformed to;

    type Query {
      # This is the transformed field
      book(bookId: ID): [Book]
    }
    
    type Book {
      id: ID
      title: String
    }

    The following call should be transformed;

    delegateToSchema({
      schema: {
        schema,
        transforms: [
          new RenameObjectFieldArguments((typeName, fieldName, argName) => {
            if (
              typeName === 'Query' &&
              fieldName === 'book' &&
              argName === 'book_id'
            ) {
              return 'bookId';
            }
            return argName;
          }),
        ],
      },
      operation: 'query',
      fieldName: 'book',
      args: {
        bookId: '1',
      },
    });

    To this query;

    {
        book(book_id: "1") {
            # ...
        }
    }
  • Updated dependencies [18682e6]:

[email protected]

20 Jan 14:11
9d588b8
Compare
Choose a tag to compare

Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.

January 15, 2025

15 Jan 15:29
fd7a875
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • #420 14152f7 Thanks @ardatan! - - In case of schema reload, throw SCHEMA_RELOAD error while recreating the transports and executors

    • In case of shut down, throw SHUTTING_DOWN error while cleaning the transports and executors up

    Previously, these errors are only thrown for subscriptions not it is thrown in other type of operations as well.
    And previously the thrown errors during these two cleanup and restart process were cryptic, now the mentioned two errors above are thrown with more clear messages

@graphql-tools/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

  • #420 14152f7 Thanks @ardatan! - dependencies updates:

  • #420 14152f7 Thanks @ardatan! - - In case of schema reload, throw SCHEMA_RELOAD error while recreating the transports and executors

    • In case of shut down, throw SHUTTING_DOWN error while cleaning the transports and executors up

    Previously, these errors are only thrown for subscriptions not it is thrown in other type of operations as well.
    And previously the thrown errors during these two cleanup and restart process were cryptic, now the mentioned two errors above are thrown with more clear messages

  • #420 14152f7 Thanks @ardatan! - Leave the supergraph configuration handling logic to fusion-runtime package so it can compare bare read supergraph sdl directly inside unified graph manager to decide if the supergraph has changed.

  • Updated dependencies [14152f7, a625269, a625269, 14152f7]:

@graphql-hive/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

  • #420 14152f7 Thanks @ardatan! - dependencies updates:

  • #420 14152f7 Thanks @ardatan! - - In case of schema reload, throw SCHEMA_RELOAD error while recreating the transports and executors

    • In case of shut down, throw SHUTTING_DOWN error while cleaning the transports and executors up

    Previously, these errors are only thrown for subscriptions not it is thrown in other type of operations as well.
    And previously the thrown errors during these two cleanup and restart process were cryptic, now the mentioned two errors above are thrown with more clear messages

@graphql-mesh/[email protected]

Patch Changes

  • #420 14152f7 Thanks @ardatan! - - In case of schema reload, throw SCHEMA_RELOAD error while recreating the transports and executors

    • In case of shut down, throw SHUTTING_DOWN error while cleaning the transports and executors up

    Previously, these errors are only thrown for subscriptions not it is thrown in other type of operations as well.
    And previously the thrown errors during these two cleanup and restart process ...

Read more

[email protected]

15 Jan 15:31
fd7a875
Compare
Choose a tag to compare

Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.

January 08, 2025

08 Jan 08:55
e1df574
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • #351 0591aa9 Thanks @ardatan! - Keep the custom directives(using @composeDirective) from the supergraph, in the unified schema served by the gateway should keep it.

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

[email protected]

08 Jan 08:57
e1df574
Compare
Choose a tag to compare

Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.

January 06, 2025

06 Jan 17:11
221f04f
Compare
Choose a tag to compare

@graphql-hive/[email protected]

Patch Changes

[email protected]

06 Jan 17:13
221f04f
Compare
Choose a tag to compare

Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.

January 02, 2025

02 Jan 13:17
ace87b0
Compare
Choose a tag to compare

@graphql-hive/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

  • #396 da65b2d Thanks @ardatan! - Memoize the key arguments correctly;

    With the following schema and resolvers, userById should batch all the requests to usersByIds;

    {
          typeDefs: /* GraphQL */ `
            type User {
              id: ID!
              email: String!
            }
            type Query {
              userById(id: ID!): User
              usersByIds(ids: [ID!]): [User]
            }
          `,
          resolvers: {
            Query: {
              usersByIds: (_root, args) => {
                return args.ids.map((id: string) => users.find((user) => user.id === id));
              },
              userById: (root, args, context, info) => {
                return batchDelegateToSchema({
                  schema: userSubschema,
                  fieldName: 'usersByIds',
                  key: args.id,
                  rootValue: root,
                  context,
                  info,
                })
              },
            },
          },
        }

    This query should batch all the requests to usersByIds:

    {
      userById(id: "1") {
        id
        email
      }
      userById(id: "2") {
        id
        email
      }
    }

    The delegation request should be;

    {
      usersByIds(ids: ["1", "2"]) {
        id
        email
      }
    }

@graphql-tools/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

  • #387 3571399 Thanks @ardatan! - In case of shared root field on Mutation, it was batched incorrectly across subgraphs. But instead only one mutation should be called as mutations should not be parallel

  • Updated dependencies []:

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-hive/[email protected]

Patch Changes

@graphql-tools/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

[email protected]

02 Jan 13:20
ace87b0
Compare
Choose a tag to compare

Pre-built binaries of the Hive Gateway for the @graphql-hive/[email protected] release.