forked from apollographql/federation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential rogue expansion of fragments when deoptimizing (apollog…
…raphql#2098) The code from apollographql#1911 ensures that named fragments from the user query are reused in subgraph query "when appropriate", but there were some code path where a fragment that was reused (correctly) could end up be "re-expanded" (due to an existing method not handling spreads properly). The resulting subgraph query ended up with the fragment definition existing but never being used, which is invalid in graphQL. This patch ensures that a reused fragment is not mistakenly re-expanded by the code (and thus avoids a query with unused fragments). Fixes apollographql#2092
- Loading branch information
Sylvain Lebresne
authored
Aug 26, 2022
1 parent
7f97f13
commit 7c06bfd
Showing
3 changed files
with
106 additions
and
26 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
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