-
Notifications
You must be signed in to change notification settings - Fork 329
fix(federation/qp): suppress the type condition at root-level inline spread in subgraph fetch operations #7580
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
apollo-federation/tests/query_plan/supergraphs/defer_on_renamed_root_type.graphql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Composed from subgraphs with hash: 342e57c5d2c95caa99ea85f70fdd3114d65d6ca7 | ||
| schema | ||
| @link(url: "https://specs.apollo.dev/link/v1.0") | ||
| @link(url: "https://specs.apollo.dev/join/v0.5", for: EXECUTION) | ||
| { | ||
| query: Query | ||
| } | ||
|
|
||
| directive @join__directive(graphs: [join__Graph!], name: String!, args: join__DirectiveArguments) repeatable on SCHEMA | OBJECT | INTERFACE | FIELD_DEFINITION | ||
|
|
||
| directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE | ||
|
|
||
| directive @join__field(graph: join__Graph, requires: join__FieldSet, provides: join__FieldSet, type: String, external: Boolean, override: String, usedOverridden: Boolean, overrideLabel: String, contextArguments: [join__ContextArgument!]) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ||
|
|
||
| directive @join__graph(name: String!, url: String!) on ENUM_VALUE | ||
|
|
||
| directive @join__implements(graph: join__Graph!, interface: String!) repeatable on OBJECT | INTERFACE | ||
|
|
||
| directive @join__type(graph: join__Graph!, key: join__FieldSet, extension: Boolean! = false, resolvable: Boolean! = true, isInterfaceObject: Boolean! = false) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR | ||
|
|
||
| directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION | ||
|
|
||
| directive @link(url: String, as: String, for: link__Purpose, import: [link__Import]) repeatable on SCHEMA | ||
|
|
||
| input join__ContextArgument { | ||
| name: String! | ||
| type: String! | ||
| context: String! | ||
| selection: join__FieldValue! | ||
| } | ||
|
|
||
| scalar join__DirectiveArguments | ||
|
|
||
| scalar join__FieldSet | ||
|
|
||
| scalar join__FieldValue | ||
|
|
||
| enum join__Graph { | ||
| SUBGRAPH1 @join__graph(name: "Subgraph1", url: "none") | ||
| } | ||
|
|
||
| scalar link__Import | ||
|
|
||
| enum link__Purpose { | ||
| """ | ||
| `SECURITY` features provide metadata necessary to securely resolve fields. | ||
| """ | ||
| SECURITY | ||
|
|
||
| """ | ||
| `EXECUTION` features provide metadata necessary for operation execution. | ||
| """ | ||
| EXECUTION | ||
| } | ||
|
|
||
| type Query | ||
| @join__type(graph: SUBGRAPH1) | ||
| { | ||
| thing: Thing | ||
| } | ||
|
|
||
| type Thing | ||
| @join__type(graph: SUBGRAPH1) | ||
| { | ||
| i: Int | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this seems redundant? guessing its a leftover from debugging?
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.
It was a necessary change. After
can_rebase_onchange, some tests failed at.or_insertcall below becauseele.key()andelement.key()became different in some cases (... on Queryvs...).In general,
eleandelementmay be different and it makes sense to look upelement.key(), instead ofele.key(). It appears that resulting in a different key viarebasehere never happened before.BTW,
to_owned_key/as_borrowed_keycalls had to be added, sinceelementitself is going to move into the closure below. So, the key had to be cloned usingto_owned_key(the normalclone()would only do a shallow cloning).