-
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.
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.
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 😊