-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implicitly upgrade federation version to the max required by any used directive #2929
Conversation
…res something higher
…rade hint can propagate
…implicit upgrades
@tninesling: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
🦋 Changeset detectedLatest commit: d831c00 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for apollo-federation-docs canceled.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Co-authored-by: Chris Lenfest <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, make sure you squash.
This change updates the changeset log from #2929 to indicate patch version bumps instead of minor version bumps.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/[email protected] ### Patch Changes - When a linked directive requires a federation version higher than the linked federation spec, upgrade to the implied version and issue a hint ([#2929](#2929)) - Stop emitting "inconsistent value type" hints against definitions where the type is marked `@external` or all fields are marked `@external`. ([#2951](#2951)) - Introduce a new composition hint pertaining specifically to progressive `@override` usage (when a `label` argument is present). ([#2922](#2922)) - Updated dependencies \[[`33b937b18d3c7ca6af14b904696b536399e597d1`](33b937b), [`09cd3e55e810ee513127b7440f5b11af7540c9b0`](09cd3e5), [`d7189a86c27891af408d3d0184db6133d3342967`](d7189a8)]: - @apollo/[email protected] - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - Remove out-of-band reporting in the gateway and provide a warning for users who have the endpoint configured. ([#2946](#2946)) - Updated dependencies \[[`33b937b18d3c7ca6af14b904696b536399e597d1`](33b937b), [`09cd3e55e810ee513127b7440f5b11af7540c9b0`](09cd3e5), [`d7189a86c27891af408d3d0184db6133d3342967`](d7189a8), [`33506bef6d755c58400081824167711c1747ee40`](33506be), [`1f72f2a361a83ebaaf15ae052f5ca9a93fc18bfc`](1f72f2a)]: - @apollo/[email protected] - @apollo/[email protected] - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - When a linked directive requires a federation version higher than the linked federation spec, upgrade to the implied version and issue a hint ([#2929](#2929)) - When auto-upgrading a subgraph (i.e. one that does not explicitly @link the federation spec) do not go past v2.4. This is so that subgraphs will not inadvertently require the latest join spec (which cause the router or gateway not to start if running an older version). ([#2933](#2933)) - Add new `generateQueryFragments` option to query planner config ([#2958](#2958)) If enabled, the query planner will extract inline fragments into fragment definitions before sending queries to subgraphs. This can significantly reduce the size of the query sent to subgraphs, but may increase the time it takes to plan the query. ## @apollo/[email protected] ### Patch Changes - Updated dependencies \[[`33b937b18d3c7ca6af14b904696b536399e597d1`](33b937b), [`09cd3e55e810ee513127b7440f5b11af7540c9b0`](09cd3e5), [`d7189a86c27891af408d3d0184db6133d3342967`](d7189a8)]: - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - When auto-upgrading a subgraph (i.e. one that does not explicitly @link the federation spec) do not go past v2.4. This is so that subgraphs will not inadvertently require the latest join spec (which cause the router or gateway not to start if running an older version). ([#2933](#2933)) - Add new `generateQueryFragments` option to query planner config ([#2958](#2958)) If enabled, the query planner will extract inline fragments into fragment definitions before sending queries to subgraphs. This can significantly reduce the size of the query sent to subgraphs, but may increase the time it takes to plan the query. - Updated dependencies \[[`33b937b18d3c7ca6af14b904696b536399e597d1`](33b937b), [`09cd3e55e810ee513127b7440f5b11af7540c9b0`](09cd3e5), [`d7189a86c27891af408d3d0184db6133d3342967`](d7189a8)]: - @apollo/[email protected] - @apollo/[email protected] ## @apollo/[email protected] ### Patch Changes - Updated dependencies \[[`33b937b18d3c7ca6af14b904696b536399e597d1`](33b937b), [`09cd3e55e810ee513127b7440f5b11af7540c9b0`](09cd3e5), [`d7189a86c27891af408d3d0184db6133d3342967`](d7189a8)]: - @apollo/[email protected] ## [email protected] ### Patch Changes - Add new `generateQueryFragments` option to query planner config ([#2958](#2958)) If enabled, the query planner will extract inline fragments into fragment definitions before sending queries to subgraphs. This can significantly reduce the size of the query sent to subgraphs, but may increase the time it takes to plan the query. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.5Subgraph B has a
@link
to fed version 2.7Subgraph C has a
@link
to fed version 2.5 and a separate@link
to the source specPrevious behavior:
New behavior: