| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
GraphQL.Internal.Value.FromValue
Description
Documentation
class FromValue a where Source #
a can be converted from a GraphQL Value to a Haskell value.
The FromValue instance converts Value to the type expected by the
handler function. It is the boundary between incoming data and your custom
application Haskell types.
FromValue has a generic instance for converting input objects to
records.
Minimal complete definition
Nothing
Methods
fromValue :: Value' ConstScalar -> Either Text a Source #
Convert an already-parsed value into a Haskell value, generally to be passed to a handler.
fromValue :: (Generic a, GenericFromValue (Rep a)) => Value' ConstScalar -> Either Text a Source #
Convert an already-parsed value into a Haskell value, generally to be passed to a handler.
Instances
| FromValue Bool Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue Double Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue Int32 Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue Text Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue v => FromValue [v] Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue v => FromValue (Maybe v) Source # | |
Defined in GraphQL.Internal.Value.FromValue | |
| FromValue v => FromValue (NonEmpty v) Source # | |
Defined in GraphQL.Internal.Value.FromValue | |