-
Notifications
You must be signed in to change notification settings - Fork 23
fix(stitch): handle @oneOf
s in subschemas
#1405
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 handling of @oneOf
directives in GraphQL schema stitching by ensuring the directive is properly preserved when merging subschemas. The fix addresses issue #1404 where @oneOf
directives were being lost during the schema stitching process.
- Adds early return for single candidate types to avoid unnecessary processing
- Preserves
@oneOf
directive on both ObjectType and InputObjectType during merging - Includes test coverage to verify the fix works correctly
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
packages/stitch/tests/mergeOneOfs.test.ts | Adds test case verifying @oneOf directives are preserved during schema stitching |
packages/stitch/src/mergeCandidates.ts | Implements the fix to preserve @oneOf directive when merging type candidates |
.changeset/rare-chairs-itch.md | Documents the change for release notes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-tools/federation |
3.2.9-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/fusion-runtime |
0.12.0-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway |
1.16.4-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/logger-json |
0.0.8-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/logger-pino |
1.0.4-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/logger-winston |
1.0.5-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/nestjs |
1.0.23-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-aws-sigv4 |
1.0.19-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/plugin-deduplicate-request |
1.0.5-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/hmac-upstream-signature |
1.2.32-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-jwt-auth |
1.5.9-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-opentelemetry |
1.3.67-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/plugin-prometheus |
1.3.55-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-hive/gateway-runtime |
1.11.0-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-tools/stitch |
9.4.29-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-common |
0.7.39-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http |
0.7.3-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-http-callback |
0.7.3-alpha-839e44c6b10873589b9c073d8abb795059199006 |
npm ↗︎ unpkg ↗︎ |
@graphql-mesh/transport-ws |
1.1.3-alpha-839e44c6b10873589b9c073d8abb795059199006 |
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
|
Fixes #1404