graphql-api-0.4.0: GraphQL API

Safe HaskellNone
LanguageHaskell2010

GraphQL.Internal.API.Enum

Description

 
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.

Minimal complete definition

Nothing

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 #