Skip to content

Conversation

@github-actions
Copy link
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

graphql-yoga@5.17.0

Minor Changes

  • #4288
    66c370c
    Thanks @EmrysMyrddin! - Add experimental support for
    coordinate error attribute proposal.

    The coordinate attribute indicates the coordinate in the schema of the resolver which
    experienced the errors. It allows for an easier error source identification than with the path
    which can be difficult to walk, or even lead to unsolvable ambiguities when using Union or
    Interface types.

    Usage

    Since this is experimental, it has to be explicitly enabled by adding the appropriate plugin to
    the Yoga instance:

    import { createYoga, useErrorCoordinate } from 'graphql-yoga'
    import { schema } from './schema'
    
    export const yoga = createYoga({
      schema,
      plugins: [useErrorCoordinate()]
    })

    Once enabled, located errors will gain the coordinate attribute:

    const myPlugin = {
      onExecutionResult({ result }) {
        if (result.errors) {
          for (const error of result.errors) {
            console.log('Error at', error.coordinate, ':', error.message)
          }
        }
      }
    }

    Security concerns

    Adding a schema coordinate to errors exposes information about the schema, which can be an attack
    vector if you rely on the fact your schema is private and secret.

    This is why the coordinate attribute is not serialized by default, and will not be exposed to
    clients.

    If you want to send this information to client, override either each toJSON error's method, or
    add a dedicated extension.

    import { GraphQLError } from 'graphql'
    import { createYoga, maskError, useErrorCoordinate } from 'graphql-yoga'
    import { schema } from './schema'
    
    export const yoga = createYoga({
      schema,
      plugins: [useErrorCoordinate()],
      maskedErrors: {
        isDev: process.env['NODE_ENV'] === 'development', // when `isDev` is true, errors are not masked
        maskError: (error, message, isDev) => {
          if (error instanceof GraphQLError) {
            error.toJSON = () => {
              // Get default graphql serialized error representation
              const json = GraphQLError.prototype.toJSON.apply(error)
              // Manually add the coordinate attribute. You can also use extensions instead.
              json.coordinate = error.coordinate
              return json
            }
          }
    
          // Keep the default error masking implementation
          return maskError(error, message, isDev)
        }
      }
    })

Patch Changes

@graphql-yoga/nestjs@3.18.0

Patch Changes

@graphql-yoga/nestjs-federation@3.18.0

Patch Changes

  • Updated dependencies []:
    • @graphql-yoga/nestjs@3.18.0
    • @graphql-yoga/plugin-apollo-inline-trace@3.17.0

@graphql-yoga/plugin-apollo-inline-trace@3.17.0

Patch Changes

@graphql-yoga/apollo-managed-federation@0.16.0

Patch Changes

@graphql-yoga/plugin-apollo-usage-report@0.12.0

Patch Changes

@graphql-yoga/plugin-apq@3.17.0

Patch Changes

@graphql-yoga/plugin-csrf-prevention@3.17.0

Patch Changes

@graphql-yoga/plugin-defer-stream@3.17.0

Patch Changes

@graphql-yoga/plugin-disable-introspection@2.18.0

Patch Changes

@graphql-yoga/plugin-graphql-sse@3.17.0

Patch Changes

@graphql-yoga/plugin-jwt@3.11.0

Patch Changes

@graphql-yoga/plugin-persisted-operations@3.17.0

Patch Changes

@graphql-yoga/plugin-prometheus@6.12.0

Patch Changes

@graphql-yoga/plugin-response-cache@3.19.0

Patch Changes

@graphql-yoga/plugin-sofa@3.17.0

Patch Changes

@graphql-yoga/render-apollo-sandbox@0.2.0

Patch Changes

@graphql-yoga/render-graphiql@5.17.0

Patch Changes

@graphql-yoga/apollo-link@5.2.0

@graphql-yoga/urql-exchange@5.2.0

hello-world-benchmark@3.19.0

Patch Changes

  • Updated dependencies
    [66c370c,
    66c370c]:
    • graphql-yoga@5.17.0
    • @graphql-yoga/plugin-response-cache@3.19.0

apollo-federation-gateway-with-yoga@3.17.0

Patch Changes

apollo-subgraph-with-yoga@3.17.0

Patch Changes

graphql-lambda@3.17.0

Patch Changes

@examples/bun-pothos@0.4.0

Patch Changes

cloudflare-advanced@3.17.0

Patch Changes

cloudflare@3.17.0

Patch Changes

nextjs-app@2.17.0

Patch Changes

@codesandbox
Copy link

codesandbox bot commented Nov 28, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@EmrysMyrddin EmrysMyrddin merged commit e1079f6 into main Nov 28, 2025
@EmrysMyrddin EmrysMyrddin deleted the changeset-release/main branch November 28, 2025 11:03
@github-actions
Copy link
Contributor Author

✅ Benchmark Results

     ✓ no_errors{mode:graphql}
     ✓ expected_result{mode:graphql}
     ✓ no_errors{mode:graphql-jit}
     ✓ expected_result{mode:graphql-jit}
     ✓ no_errors{mode:graphql-response-cache}
     ✓ expected_result{mode:graphql-response-cache}
     ✓ no_errors{mode:graphql-no-parse-validate-cache}
     ✓ expected_result{mode:graphql-no-parse-validate-cache}
     ✓ no_errors{mode:uws}
     ✓ expected_result{mode:uws}

     checks.......................................: 100.00% ✓ 508882     ✗ 0     
     data_received................................: 2.1 GB  14 MB/s
     data_sent....................................: 102 MB  682 kB/s
     http_req_blocked.............................: avg=1.51µs   min=981ns    med=1.31µs   max=280.94µs p(90)=1.96µs   p(95)=2.15µs  
     http_req_connecting..........................: avg=2ns      min=0s       med=0s       max=138.94µs p(90)=0s       p(95)=0s      
     http_req_duration............................: avg=368.87µs min=210.78µs med=340.36µs max=18.81ms  p(90)=485.47µs p(95)=506.43µs
       { expected_response:true }.................: avg=368.87µs min=210.78µs med=340.36µs max=18.81ms  p(90)=485.47µs p(95)=506.43µs
     ✓ { mode:graphql-jit }.......................: avg=281.57µs min=210.78µs med=264.37µs max=18.81ms  p(90)=293.93µs p(95)=305.68µs
     ✓ { mode:graphql-no-parse-validate-cache }...: avg=511.26µs min=426.71µs med=488.46µs max=6.28ms   p(90)=526.15µs p(95)=546.99µs
     ✓ { mode:graphql-response-cache }............: avg=350.12µs min=267.31µs med=333.81µs max=9.72ms   p(90)=363.55µs p(95)=374.2µs 
     ✓ { mode:graphql }...........................: avg=378.14µs min=283.71µs med=350.57µs max=15.91ms  p(90)=398.57µs p(95)=449.13µs
     ✓ { mode:uws }...............................: avg=367.94µs min=284.95µs med=347.01µs max=6.03ms   p(90)=381.64µs p(95)=399.27µs
     http_req_failed..............................: 0.00%   ✓ 0          ✗ 254441
     http_req_receiving...........................: avg=33.47µs  min=16.91µs  med=32.58µs  max=2.84ms   p(90)=39.68µs  p(95)=42.36µs 
     http_req_sending.............................: avg=8.92µs   min=6.07µs   med=7.89µs   max=200.69µs p(90)=11.25µs  p(95)=12.55µs 
     http_req_tls_handshaking.....................: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting.............................: avg=326.47µs min=177.48µs med=299.58µs max=18.67ms  p(90)=442.62µs p(95)=462.03µs
     http_reqs....................................: 254441  1696.25588/s
     iteration_duration...........................: avg=584.52µs min=380.4µs  med=551.62µs max=19.33ms  p(90)=704.94µs p(95)=728.47µs
     iterations...................................: 254441  1696.25588/s
     vus..........................................: 1       min=1        max=1   
     vus_max......................................: 2       min=2        max=2   

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant