Change8

release-1764327921060

📦 graphql-yogaView on GitHub →
1 features🔧 4 symbols

Summary

graphql-yoga@5.17.0 introduces experimental support for the `coordinate` error attribute via the `useErrorCoordinate` plugin and updates core dependencies to @graphql-tools/executor@^1.5.0 and @graphql-tools/utils@^10.11.0.

Migration Steps

  1. Enable the experimental coordinate attribute by adding the `useErrorCoordinate()` plugin to the Yoga configuration (e.g., `plugins: [useErrorCoordinate()]`).
  2. If you need to expose the `coordinate` field to clients, override `GraphQLError.toJSON` or add a custom extension as shown in the documentation.
  3. Review security implications: the coordinate reveals schema details, so ensure it is only enabled in trusted environments or development mode.

✨ New Features

  • Add experimental support for the `coordinate` error attribute proposal, allowing resolvers to include schema coordinate information in GraphQL errors.

🔧 Affected Symbols

useErrorCoordinateGraphQLError.coordinatecreateYogamaskedErrors.maskError