-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix value comparison, argument merging, and link feature addition/ext…
…raction in composition (#3134) While reviewing recent code changes that released in `2.9.0`, I noticed a few bugs in the code, so I've pushed some fixes for them in this PR (along with some fixes for more ancient bugs). I'll comment on the code with more details, but to summarize the fixes: - Value comparison/default value application has been updated to handle `null`s/`undefined`s better. - Composition argument strategy code has been refactored to handle nullability more cleanly (and fix some bugs around nullability). - Note I've commented out the unused `SUM` strategy, as using it currently wouldn't yield expected results since directive applications are deduped before being merged. - The logic that applies `@link` applications to the supergraph schema for supergraph specs needed by subgraph directives has been updated to handle specs that have multiple directives that need composing (the behavior before was adding spurious directive definitions to the supergraph schema). - Some ancient logic around computing directive/type names for `@core`/`@link` was off.
- Loading branch information
1 parent
fd2db6f
commit e6c05b6
Showing
9 changed files
with
287 additions
and
160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@apollo/federation-internals": patch | ||
"@apollo/gateway": patch | ||
"@apollo/composition": patch | ||
--- | ||
|
||
Fix bugs in composition when merging nulls in directive applications and when handling renames. |
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.