Closed teh closed 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)
Thanks! I'll merge but will keep in mind that we need to fix enumValues
.
Rough implementation, has some nice properties though not encoded as well as they could be:
enumValues
fails if there is an invalid name (right now through an incomplete pattern match).enumValues
is mostly internal so we can decide how we want to fail here. Should tie in with general validation.instance GraphQLEnum A
)