Skip to content

Conversation

ardatan
Copy link
Member

@ardatan ardatan commented Sep 24, 2025

@Copilot Copilot AI review requested due to automatic review settings September 24, 2025 14:35
@ardatan ardatan force-pushed the batch-delegation-error branch from 41866b5 to d83adff Compare September 24, 2025 14:36
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes error path handling in batch delegation scenarios where the same error occurs multiple times. The fix ensures that error paths are correctly preserved when using batch delegation, preventing duplicate error reporting while maintaining proper error location information.

  • Changed error tracking from WeakMap to WeakSet for more appropriate duplicate detection
  • Added error path relocation handling in batch delegation to preserve GraphQL error paths
  • Added comprehensive test coverage to verify error path preservation in both regular and batch delegation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/delegate/src/resolveExternalValue.ts Optimizes error tracking by switching from WeakMap to WeakSet
packages/batch-delegate/src/batchDelegateToSchema.ts Adds error path relocation handling for batch delegation
packages/batch-delegate/tests/errorPaths.test.ts Adds test coverage for error path preservation in delegation scenarios
.changeset/breezy-weeks-camp.md Documents the patch changes for both affected packages

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ardatan ardatan force-pushed the batch-delegation-error branch 2 times, most recently from a72d259 to ef70193 Compare September 24, 2025 14:40
@ardatan ardatan force-pushed the batch-delegation-error branch from ef70193 to bb9905f Compare September 24, 2025 14:41
@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (alpha)

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

Package Version Info
@graphql-tools/batch-delegate 10.0.2-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-tools/delegate 11.0.2-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-tools/federation 4.0.6-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-mesh/fusion-runtime 1.2.5-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-hive/gateway 2.1.8-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-hive/nestjs 2.0.13-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-aws-sigv4 2.0.8-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-hive/plugin-opentelemetry 1.0.11-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 2.0.12-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 2.1.8-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-tools/stitch 10.0.3-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-tools/stitching-directives 4.0.2-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎
@graphql-tools/wrap 11.0.2-alpha-dcb765bab60193466bd9d821a337f60ba742f96c npm ↗︎ unpkg ↗︎

@ardatan ardatan enabled auto-merge (squash) September 24, 2025 14:45
@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Binary for Linux-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Binary for Linux-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Binary for macOS-ARM64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Binary for Windows-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Binary for macOS-X64)

The latest changes of this PR are available for download (based on the declared changesets).

Download

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Node Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:2.1.8-alpha-dcb765bab60193466bd9d821a337f60ba742f96c

@theguild-bot
Copy link
Collaborator

theguild-bot commented Sep 24, 2025

🚀 Snapshot Release (Bun Docker Image)

The latest changes of this PR are available as image on GitHub Container Registry (based on the declared changesets):

ghcr.io/graphql-hive/gateway:2.1.8-alpha-dcb765bab60193466bd9d821a337f60ba742f96c-bun

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.

[batch-delegate] Error paths use their batched indices
2 participants