Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assertion error with overlapping fragments and subtyping (#2594)
When checking for name fragments to reuse, when some fields implementing interfaces use subtyping (meaning that the type of the field implementation is a sub-type of the type declared for that field in the interface), an assertion error of the form `Cannot add selection of field X to selection set of parent type Y` was sometimes raised (see the comments in the commit for mode details). Fixes #2592.
- Loading branch information
Sylvain Lebresne
committed
May 24, 2023
1 parent
e874a43
commit 5cd17e6
Showing
4 changed files
with
224 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
--- | ||
"@apollo/query-planner": patch | ||
"@apollo/federation-internals": patch | ||
--- | ||
|
||
Fix assertion error in some overlapping fragment cases. In some cases, when fragments overlaps on some sub-selections | ||
and some interface field implementation relied on sub-typing, an assertion error could be raised with a message of | ||
the form `Cannot add selection of field X to selection set of parent type Y` and this fixes this problem. | ||
|
This file contains 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 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 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