Skip to content
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

WIP: chore(@override): add e2e testing of progressive overriding #2978

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

metrue
Copy link

@metrue metrue commented Apr 11, 2024

This PR is trying to validate if the @override behaves correctly when the progressive label applied, because when I trying to move one of my entities from a subgraph to another subgraph, I tried to leverage this progressive overriding to shift the traffic gradually, but the result observed,

  • When no label applied, the overriding field will always be resolved in the new subgraph
  • When label applied, the overriding field will always be resolved in the old subgraph

I did read the document in Apollo website, and doubled check my schema design for our internal service, I did not find anything wrong, so I am opening this PR to validate @override(from: string, label: string), and you can see the test result proved above conclusion: label not working as expecting, when label applied, the resolving always happens in the old subgraph.

Could someone help review it and explain a little bit if I am doing it correct?

@metrue metrue requested a review from a team as a code owner April 11, 2024 03:52
@apollo-cla
Copy link

@metrue: 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/

Copy link

netlify bot commented Apr 11, 2024

👷 Deploy request for apollo-federation-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit dbcc7b5

Copy link

changeset-bot bot commented Apr 11, 2024

⚠️ No Changeset found

Latest commit: dbcc7b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codesandbox-ci bot commented Apr 11, 2024

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.

…uery for every request to control the on/off based on the label
…uery for every request to control the on/off based on the label
@metrue
Copy link
Author

metrue commented Apr 17, 2024

Confirmed with Apollo team, the progressive feature for @override only supported on Rust router, so it's not possible to use it on federation/gateway out of box.

But if we really need to do it on the federation/gateway, we can do a little hacking in the queryplan building but it will lose the queryplan caching. I tried this commit 1da5e43, now you can see the CI is passed, but obviously it's a thing to try on production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants