Skip to content

Support errors thrown in the gateway. I.e. during validation - #8383

Open
jdolle wants to merge 4 commits into
mainfrom
gateway-plugin-gateway-errors
Open

Support errors thrown in the gateway. I.e. during validation#8383
jdolle wants to merge 4 commits into
mainfrom
gateway-plugin-gateway-errors

Conversation

@jdolle

@jdolle jdolle commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Background

This adds support for errors thrown during the validation phase in the gateway. Previously, if subgraph requests were being made, then only those requests were used to collect the errors.

Description

Adds a new gatewayErrors field to the payload, which will need documentation updated.

The rest of the gateway request is still appended to the fetches array as a single "fetch". So in this case, the errors are stripped from this faked "fetch" and added to the gatewayErrors array. This is to avoid double counting the errors, and to keep the gatewayErrors as a consistent place for, well, errors in the gateway.

This also modifies some of the operation building to more closely match the yoga plugin. E.g. using context.waitUntil and support for persisted documents.

Checklist

  • Input validation
  • Output encoding
  • Error handling and logging
  • Testing

@jdolle jdolle self-assigned this Aug 19, 2026
@theguild-bot

theguild-bot commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-hive/apollo 0.48.6-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎
@graphql-hive/cli 0.62.1-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎
@graphql-hive/core 0.22.4-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎
@graphql-hive/envelop 0.40.11-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-plugin-console-sdk 0.1.5-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎
@graphql-hive/yoga 0.49.5-alpha-20260819180258-65f5f42b0fdf21fce0071773eed72974e6c59e94 npm ↗︎ unpkg ↗︎

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tags: 11.12.0-alpha-65f5f42, 65f5f42, 65f5f42b0fdf21fce0071773eed72974e6c59e94

@jdolle
jdolle requested a review from n1ru4l August 19, 2026 18:00
@jdolle
jdolle marked this pull request as ready for review August 19, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants