Skip to content

Releases: ardatan/graphql-tools

July 31, 2024

31 Jul 08:16
77866ec
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • 0d203ab
    Thanks @ardatan! - Support @requires with arguments like
    @requires(fields: "price(currency: 'USD')")

July 30, 2024

30 Jul 16:54
1f6b2fa
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

July 30, 2024

30 Jul 16:33
9b10c1f
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • 63cab60
    Thanks @ardatan! - Use type definition merger instead of
    `concatAST` to merge type definitions for creating a subschema for Federation

July 30, 2024

30 Jul 11:42
5c8f8e5
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

July 30, 2024

30 Jul 11:18
db09de5
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Minor Changes

  • ca57eae
    Thanks @ardatan! - Support multiple entrypoints with
    @merge(keyField)

    type User {
      id: ID!
      name: String!
    }
    
    type Query {
      userById(id: ID!): User @merge(keyField: "id")
      userByName(name: String!): User @merge(keyField: "name")
    }

July 23, 2024

23 Jul 15:44
2ccfa49
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

@graphql-tools/[email protected]

Minor Changes

  • 33e8146
    Thanks @ardatan! - Ability to create critical errors that prevents
    to return a partial results

    import { CRITICAL_ERROR } from '@graphql-tools/executor'
    
    const schema = makeExecutableSchema({
      typeDefs: `
        type Query {
          hello: String
        }
      `,
      resolvers: {
        Query: {
          hello: () =>
            new GraphQLError('Critical error', {
              extensions: {
                [CRITICAL_ERROR]: true
              }
            })
        }
      }
    })

    This will prevent to return a partial results and will return an error instead.

    const result = await execute({
      schema,
      document: parse(`{ hello }`)
    })
    
    expect(result).toEqual({
      errors: [
        {
          message: 'Critical error'
        }
      ],
      data: null // Instead of { hello: null }
    })

@graphql-tools/[email protected]

Patch Changes

July 23, 2024

23 Jul 13:15
d46f41b
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Minor Changes

July 23, 2024

23 Jul 11:07
ad8d4f4
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • 167b47c
    Thanks @ardatan! - New options to configure query batching and
    batched delegation

    {
      batchingOptions: {
        dataLoaderOptions: {
          maxBatchSize: 10, // Limits the query batching
        }
      },
      batchDelegateOptions: {
        maxBatchSize: 10, // Limits the batch delegation
      }
    }

    Learn more about these here;
    Batch Delegation
    Query Batching

July 23, 2024

23 Jul 10:36
e742494
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

July 22, 2024

22 Jul 10:48
e5841ae
Compare
Choose a tag to compare

@graphql-tools/[email protected]

Patch Changes

  • d54b21a
    Thanks @ardatan! - If an abstract type on the gateway resolves to a
    type that does not exist on the gateway, return null instead of showing an error to the user

  • d54b21a
    Thanks @ardatan! - If an enum value coming from the subschema is not
    available on gateway, do not show an error to the user but return null instead

@graphql-tools/[email protected]

Patch Changes