github ardatan/graphql-tools release-1721749482915
July 23, 2024

latest releases: release-1732269407946, graphql-tools@9.0.4, @graphql-tools/utils@10.6.0...
4 months ago

@graphql-tools/delegate@10.0.16

Patch Changes

  • 33e8146
    Thanks @ardatan! - Fail on query planning phase if the query plan is
    not successful before the actual execution

  • Updated dependencies
    [33e8146]:

    • @graphql-tools/executor@1.3.0

@graphql-tools/executor@1.3.0

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/federation@2.2.1

Patch Changes

  • 33e8146
    Thanks @ardatan! - Fail on query planning phase if the query plan is
    not successful before the actual execution

  • Updated dependencies
    [33e8146]:

    • @graphql-tools/delegate@10.0.16

Don't miss a new graphql-tools release

NewReleases is sending notifications on new releases.