Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The existing code was only able to reuse named fragments in a small subset of cases (essentially when the fragment was matched by a full sub-selection). This patch makes the code much more able to reuse fragments by allowing to match sub-selections, handle intersecting fragments, etc...
- Loading branch information
Sylvain Lebresne
committed
Mar 30, 2023
1 parent
450b957
commit 01fe3f8
Showing
6 changed files
with
858 additions
and
151 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,11 @@ | ||
--- | ||
"@apollo/query-planner": patch | ||
"@apollo/federation-internals": patch | ||
"@apollo/gateway": patch | ||
--- | ||
|
||
Improves reuse of named fragments in subgraph fetches. When a question has named fragments, the code tries to reuse | ||
those fragment in subgraph fetches is those can apply (so when the fragment is fully queried in a single subgraph fetch). | ||
However, the existing was only able to reuse those fragment in a small subset of cases. This change makes it much more | ||
likely that _if_ a fragment can be reused, it will be. | ||
|
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
Oops, something went wrong.