haskell-graphql / graphql-api

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

Generic enum #64

Closed teh closed 7 years ago

teh commented 7 years ago

Rough implementation, has some nice properties though not encoded as well as they could be:

teh commented 7 years ago

Two examples:

instance GraphQLEnum B

data B = B1 | B2 | B3 deriving (Generic, Show)
data A = A1 | A2 Text | A3 deriving (Generic, Show)
teh commented 7 years ago

Thanks! I'll merge but will keep in mind that we need to fix enumValues.