-
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.
Browse files
Browse the repository at this point in the history
The code that recognize (and optimize accordindly) when a `@require` condition is taken _just after_ a key edge (which is the most common case in practice) was mistakenly assuming that the selection set "just after a key edge" was only starting by a single fragment. In practice, when multiple conditions (`@skip`/`@include`) are involved, all those conditions are preserved and may be layed out on multiple conditions. That is, after a key edge, the selection set may look like: ```graphql ... on EntityType @Skip(if: $c1) { ... on EntityType @include(if: $c2) { <rest of the selection> } } ``` In that case, the wrong part of the code was taken and this resulted in unoptimized query plans, ones having useless fetches. The commit fixes the condition, and ensure that now that the proper optimizations do apply, we streamline the created result sets by avoiding repeating conditions multiple times.
- Loading branch information
Sylvain Lebresne
committed
May 17, 2022
1 parent
63aea30
commit 1428453
Showing
6 changed files
with
245 additions
and
33 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
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.