-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add ability to chain rest links #309
base: master
Are you sure you want to change the base?
Conversation
If a Rest Link directive has an endpoint defined but the current Rest Link does not have a matching endpoint registered, don't remove that directive. Assume it will be defined in the following rest link.
@willyboy: 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/ |
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.
Conceptually I like the approach!
I think I'd like an option-flag that declares enableRestLinkChaining
(or isTerminalLink
+ default: true
), that way this doesn't have to be a breaking change for the whole link, but rather just becomes a feature release.
Any thoughts?
I'm leaning towards enableChaining. I like the feature flag nature of it so that if chaining became the default, it could be more easily deprecated. |
Co-authored-by: Frederic Barthelemy <[email protected]>
Co-authored-by: Frederic Barthelemy <[email protected]>
Made some updates. If this works I can go ahead and add a unit test and an example in the docs. |
POC PR for chaining Rest Links
If a Rest Link directive has an endpoint defined but the current Rest Link does not have a matching endpoint registered, don't remove that directive. Assume it will be defined later down the link chain.
Caveats:
Issue reference: #308