graphql-api-0.2.0: Sketch of GraphQL stuff

Safe HaskellNone
LanguageHaskell2010

GraphQL.API.Enum

Synopsis

Documentation

class GraphQLEnum a where Source #

For each enum type we need 1) a list of all possible values 2) a way to serialise and 3) deserialise.

TODO: Update this comment to explain what a GraphQLEnum is, why you might want an instance, and any laws that apply to method relations.

Methods

enumValues :: [Either NameError Name] Source #

enumValues :: (Generic a, GenericEnumValues (Rep a)) => [Either NameError Name] Source #

enumFromValue :: Name -> Either Text a Source #

enumFromValue :: (Generic a, GenericEnumValues (Rep a)) => Name -> Either Text a Source #

enumToValue :: a -> Name Source #

enumToValue :: (Generic a, GenericEnumValues (Rep a)) => a -> Name Source #