-
Notifications
You must be signed in to change notification settings - Fork 25
fix(batch-delegate): correct error paths in case of batch delegation #1556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
41866b5
to
d83adff
Compare
There was a problem hiding this 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.
a72d259
to
ef70193
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
ef70193
to
bb9905f
Compare
🚀 Snapshot Release (
|
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 ↗︎ |
🚀 Snapshot Release (Node Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
🚀 Snapshot Release (Bun Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
Closes ardatan/graphql-tools#2951
Fixes ardatan/graphql-tools#2950