-
Notifications
You must be signed in to change notification settings - Fork 243
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
Conditional directive application based on @tag
names
#2820
Labels
Comments
For the first example use-case, an alternative could be to accept a The other use-case, however, wouldn't be possible without adding a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the value of Contracts a way to split out supergraphs from a source variant, there's often use-cases where some directives may only apply to a subset of produced contracts.
Federation should enable a way to do so through a proposed new dircective
@applyOnTag
where, as the name implies, it'll only apply a given directive on a field if it were to be composed into the resulting contract.As an example, deprecating fields for a given contract can be helpful, thus:
field: String @applyOnTag(tag:"public", directive: "@deprecated(reason:\"test\")")
(or similar).Or for the new AuthN/Z directives, applying conditional scope checks based on the type of contract, as auth models may differ on certain contracts vs. others.
The text was updated successfully, but these errors were encountered: