-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
Implement oneOf for input types #2421
Comments
Would that be @strawberry.mutations.oneOf()
def foo(arg1: Optional[str], arg2: Optional[int]):
... or use enums like async-graphql? |
Any progress on that? It seems the PR is open and ready but no one approves it :( |
@Aponace while the PR adds the directive, it doesn't add runtime support for it, we'd need to implement that to make it work 😊 |
@patrick91 I'm interested in implementing this! It seems like we could take #2560 to add Seems like the logic is straightforward, just not 100% sure on where the implementation should live. |
Might be worth implementing this upcoming feature, unions are not allowed in input types and this is a good alternative to that, also should be easy to implement in code 😊
https://stepzen.com/blog/coming-soon-to-graphql-the-oneof-input-object
It's also been implemented in other libraries, for example async GraphQL (a rust library)
From: #2420 (reply in thread)
The specs: https://github.com/graphql/graphql-spec/pull/825/files
Upvote & Fund
The text was updated successfully, but these errors were encountered: