-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect removal of fragments only used by other fragments (#2648)
The patch from #2628, while it did fix the issue of leaving unused fragments, mistakenly introduced a regression in that fragments that are used by other fragments but are not used in the query selection are now removed, which is obviously undesirable. This was simply because the patch of #2628 only counted the usages in the main selection, not the ones other fragments as it should have. This commit fixes that.
- Loading branch information
Sylvain Lebresne
authored
Jul 3, 2023
1 parent
d4bf1fb
commit 02eab3a
Showing
3 changed files
with
134 additions
and
0 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,7 @@ | ||
--- | ||
"@apollo/federation-internals": patch | ||
--- | ||
|
||
Fix regression in named fragment reuse introduced by 2.4.8 that caused fragments that were only used by other fragments | ||
to not be reused, even if they are making the overall query smaller and thus should be reused. | ||
|
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