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 bug in patch for apollographql#2137 (apollographql#2140)
The code from apollographql#2137 is optimizing some use of __typename when other fields are queried alongside it. But when __typename had only inline fragments alongside it, the logic was flawed and was discarding any potential instance of the optimization done somewhere more nested. This fixes that problem. Additionally, this patch adds a test for the optimization of apollographql#2137, but to do that, this patch adds a new behaviour to the query planner whereby along the generation of the plan, it also exposes some statistics on the plan generation. As of this commit, the only thing exposed is the number of plan that were evaluated under the hood, as that is what we care to check here (but it is also one of the main contributor to time spent query planning, so arguably an important statistic).
- Loading branch information
Sylvain Lebresne
authored
Sep 13, 2022
1 parent
c99de57
commit 4064c07
Showing
4 changed files
with
223 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
Oops, something went wrong.