haskell-graphql / graphql-api

Write type-safe GraphQL services in Haskell
BSD 3-Clause "New" or "Revised" License
406 stars 35 forks source link

Support union types #57

Closed teh closed 7 years ago

teh commented 7 years ago

This is a tricky one: To support union types we need type-safe, open sum types that can combine both the correct handler for an Object with the field selection from an inline fragment - i.e. only evaluate the inline fragment if the server returned a specific handler.

I have some parts of the puzzle working (the open sum type) but I'm not entirely sure yet how the end-user code will work.

jml commented 7 years ago

I recommend starting with something that's as close to an end-to-end test as you can manage. It can help when we don't know how things are supposed to look.

teh commented 7 years ago

done