-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix case where reusing fragments can still lead to invalid selection …
…with conflicting fields (#2740) Trying to reuse fragments, if done without specific case, can in some context result in invalid selections due to fields conflicting. It is to avoid that problem that #2619 introduced the `FieldsConflictValidator` mechanism (later improved by #2635). Unfortunately, in some fairly specific setups with nested fragments, the code was missing some data in the validation mentioned above, which led to still having case where a subgraph fetch may be invalid due to some fields (within reusing fragments) conflicting at some point of the query. This commit fix that issue by ensuring we take everything we should into account when doing the aforementioned validation.
- Loading branch information
Sylvain Lebresne
committed
Aug 21, 2023
1 parent
ef07ec8
commit c44f0ca
Showing
3 changed files
with
169 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6570,6 +6570,7 @@ describe("named fragments", () => { | |
{ | ||
t1 { | ||
other { | ||
__typename | ||
id | ||
} | ||
} | ||
|