Skip to content

Union of types as attribute type in strawberry input class #2420

Answered by patrick91
eddysen asked this question in General
Discussion options

You must be logged in to vote

Hi @eddysen! Unfortunately, this is not supported by the GraphQL spec :(

There's a potential alternative which is called oneOf but that hasn't been implemented yet in the spec, but it is easy to implement by hand: https://stepzen.com/blog/coming-soon-to-graphql-the-oneof-input-object

maybe we can implement it in future if there's enough demand 😊

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@eddysen
Comment options

@patrick91
Comment options

@eddysen
Comment options

Answer selected by patrick91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants