-
Hello, can any one show me how i can manage to use Union of types as type for attribute in strawberry input class ?
when trying it's telling me that Union for ProduitClientInType is not supported because it is an Input type |
Beta Was this translation helpful? Give feedback.
Answered by
patrick91
Dec 26, 2022
Replies: 1 comment 3 replies
-
Hi @eddysen! Unfortunately, this is not supported by the GraphQL spec :( There's a potential alternative which is called maybe we can implement it in future if there's enough demand 😊 |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
patrick91
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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-objectmaybe we can implement it in future if there's enough demand 😊