Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible fragment-related assertion error during query planning. (#…
…2596) The assertion throw had message of the form `Cannot add fragment of condition X (runtimes: ...) to parent type Y (runtimes: ...)` and was due to not always properly maintaining the "parent type" information when fragment spreads expanding into some other spread. Additionally, this commit fixes a small issue in the code computing the "diff" of what remains in a selection set after a fragment has be "reused", which could lead to inefficient (and weird looking) selections in fetches.
- Loading branch information
Sylvain Lebresne
committed
May 24, 2023
1 parent
5cd17e6
commit e136ad8
Showing
4 changed files
with
151 additions
and
15 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 possible fragment-related assertion error during query planning. This prevents a rare case where an assertion with a | ||
message of the form `Cannot add fragment of condition X (runtimes: ...) to parent type Y (runtimes: ...)` could fail | ||
during query planning. | ||
|
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