-
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.
Implicitly upgrade federation version to the max required by any used…
… directive (#2929) # Overview The recent addition of `SourceSpecDefinition` surfaced a case where a subgraph with a `@link` to federation < 2.7 and a `@link` to the source spec (which requires federation >= 2.7) results in an unexpected error during composition. Validation for this case was introduced in #2914, raising a composition error when the versions are mismatched. Since the existing behavior will implicitly upgrade to a later minor version of federation when two subgraphs are mismatched, it makes sense to do the same with feature requirements. # Example Subgraph A has a `@link` to fed version 2.5 Subgraph B has a `@link` to fed version 2.7 Subgraph C has a `@link` to fed version 2.5 and a separate `@link` to the source spec Previous behavior: 1. Composing Subgraph A and Subgraph B silently upgrades to fed version 2.7 2. Composing Subgraph A and Subgraph C results in a composition error New behavior: 1. Composing Subgraph A and Subgraph B silently upgrades to fed version 2.7 2. Composing Subgraph A and Subgraph C upgrades to fed version 2.7 and raises a hint explaining why --------- Co-authored-by: Chris Lenfest <[email protected]>
- Loading branch information
1 parent
f9662c7
commit 33b937b
Showing
8 changed files
with
212 additions
and
35 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,6 @@ | ||
--- | ||
"@apollo/composition": minor | ||
"@apollo/federation-internals": minor | ||
--- | ||
|
||
When a linked directive requires a federation version higher than the linked federation spec, upgrade to the implied version and issue a hint |
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
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