-
Notifications
You must be signed in to change notification settings - Fork 236
RFC: @matches
directive
#1817
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
base: main
Are you sure you want to change the base?
RFC: @matches
directive
#1817
Conversation
FYI the link to the RFC doesn't work. Edit: now it does! :) |
@rbalicki2 fixed |
Overall, love it!! Haven't read it entirely fully, but a few nits for clarity:
|
Co-authored-by: Steve Rice <[email protected]>
thanks @rbalicki2! thanks for the feedback, will incorporate this.
Happy to do this in whichever way makes the most sense to most people, but my thinking was this makes the most sense as a combined proposal rather than splitting them into independent proposals that might land at different times. I'd be slightly nervous about folks using the new directive without validation rules, since it seems too easy to construct an invalid query by passing in garbage array arguments (with relay this is impossible) |
This RFC proposes
@matches
as a way for clients to express what types they support when receiving an array of unions of polymorphic types:SDL
Query
See the full RFC here: https://github.com/magicmark/graphql-wg/blob/patch-18/rfcs/MatchesDirective.md
(This came out of a GraphQLConf unconf discussion topic - thanks to @captbaritone @rbalicki2 @benjie! :)