feat: add progressive @override support with label argument#314
Open
mcheemaa wants to merge 1 commit into
Open
feat: add progressive @override support with label argument#314mcheemaa wants to merge 1 commit into
mcheemaa wants to merge 1 commit into
Conversation
|
Hello @mcheemaa Unfortunately we are not actively maintaining this repo or accepting contributions at the time, but are considering getting back to it soon. Given that apollo-federation-ruby is currently supporting Apollo Federtion v2.3, I'm also hesitant to accept a single feature from v2.7 without bringing support for the whole library up to spec with that version of Apollo Federation. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for the
labelargument on the@overridedirective, enabling progressive/percentage-based traffic splitting during subgraph migrations.Motivation
Apollo Federation v2.7 introduced progressive
@overridewhich allows gradual migration of fields between subgraphs by controlling the percentage of traffic routed to each. This is useful for safely migrating high-traffic fields.Apollo Documentation: https://www.apollographql.com/blog/safer-migrations-of-fields-using-progressive-rollouts
Usage
Generated SDL:
Changes
lib/apollo-federation/field.rb- Added optionallabelargument to@overridedirectivelib/apollo-federation/schema.rb- Made federation version configurable in@linkURL (>= 2.3 uses specified version, otherwise defaults to 2.3 for backwards compatibility)spec/apollo-federation/service_field_v2_spec.rb- Added tests forlabelargument and version configurabilityREADME.md- Updated documentationBackwards Compatibility
override: { from: 'X' }usage continues to work unchangedfederation version: '2.0'still outputv2.3in the@linkURL (current behavior)labelargument is optional