-
Notifications
You must be signed in to change notification settings - Fork 25
fix(delegate): apply type-merging in extension fields #1557
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
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 an issue with type-merging in extension fields within the delegate package. The fix ensures that transformed schemas with extension fields can properly resolve merged types by implementing additional lookup logic.
- Added fallback logic to find merged type information when the initial lookup fails
- Added comprehensive test case covering schema stitching with extensions and subscriptions
- Updated changeset to document the fix for type-merging in extended fields
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/delegate/src/resolveExternalValue.ts | Added fallback logic to find merged type info by searching through possible type names and matching subschema names |
packages/stitch/tests/stitchSchemas.test.ts | Added comprehensive test case demonstrating schema extension with stitching directives and subscription handling |
.changeset/big-dryers-sniff.md | Added changeset documenting the type-merging fix |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-tools/batch-delegate |
10.0.2-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/delegate |
11.0.2-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/federation |
4.0.6-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/fusion-runtime |
1.2.5-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway |
2.1.8-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/nestjs |
2.0.13-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-aws-sigv4 |
2.0.8-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-opentelemetry |
1.0.11-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-prometheus |
2.0.12-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-runtime |
2.1.8-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitch |
10.0.3-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitching-directives |
4.0.2-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/wrap |
11.0.2-alpha-56acbbb5a57e8d136b9efa99c1b7c87a5ccd64b7 |
npm ↗︎ unpkg ↗︎ |
🚀 Snapshot Release (Bun Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
🚀 Snapshot Release (Node Docker Image)The latest changes of this PR are available as image on GitHub Container Registry (based on the declared
|
Closes ardatan/graphql-tools#4994
When there is a computed field in the extension field's return type, there was a bug causing the type merging skipped.
This PR solves that issue.