Closed kubaracek closed 3 years ago
Thanks for bringing up this issue, @kubaracek.
The problem here is how to represent that in Mu's type-level schema language. Since it originated from Protobuf/Avro, the notion of union in Mu is mostly tied to a field, but GraphQL has a notion of union type. We haven't been able to solve this mismatch yet.
But maybe you can help us! Could you come up with a small GraphQL schema and how you could imagine the resolvers to work? Maybe you need to define a sum type upfront, and then return that?
@kubaracek you might be pleased to know that @serras is working on this on #270 😉
Ua! Nice. Will give it a try. Thank you :)
Awesome! @kubaracek bear in mind that since this is not yet released you'll have to rely on pinning your mu-haskell dep to the specific commit in which this was merged 😉
@kubaracek now it's released on hackage! https://github.com/higherkindness/mu-haskell/releases/tag/v0.5.0.0
Just finished playing with this library and noticed that union types for Graphql are not supported. Is this something on a roadmap or no plans to support them in general?