-
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 merging of graphQL built-in directives
The patch from #1567 mistakenly broke then merging of graphQL built-in directives (typically `@deprecated`). And unfortunately, we were missing tests for it. This commit fixes that issue and adds proper testing. While adding tests, I also noticed that when merging repeatable directives that have arguments, if the argument values didn't match between subgraphs, we were failing composition (on account that we don't know which of the arguments should "win"), but the error returned was not useful to users. Or more precisely, merging wasn't error out but instead was applying the non-repeatable directive multiple times to the supergraph, and so upon validating the supergraph at the end of merging, the user would get a "@x cannot appears multiple times at this location", but that's not as actionnable as it should be. The patch adds a better error for this (and a test for it).
- Loading branch information
Sylvain Lebresne
committed
Mar 8, 2022
1 parent
82d810f
commit b50e09c
Showing
6 changed files
with
177 additions
and
7 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
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