morpheus-graphql-0.26.0: Morpheus GraphQL
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Morpheus.Types

Description

GQL Types

Synopsis

Documentation

class GQLType a where #

GraphQL type, every graphQL type should have an instance of Generic and GQLType.

   ... deriving (Generic, GQLType)
 

if you want to add description

      ... deriving (Generic)

    instance GQLType ... where
       directives _ = typeDirective (Describe "some text")
 

Minimal complete definition

Nothing

Associated Types

type KIND a :: DerivingKind #

type KIND a = TYPE

Methods

directives :: f a -> DirectiveUsages #

Instances

Instances details
GQLType ID 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND ID :: DerivingKind #

Methods

directives :: f ID -> DirectiveUsages #

__type :: f ID -> TypeCategory -> TypeData

GQLType DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND DefaultValue :: DerivingKind #

Methods

directives :: f DefaultValue -> DirectiveUsages #

__type :: f DefaultValue -> TypeCategory -> TypeData

GQLType Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Deprecated :: DerivingKind #

Methods

directives :: f Deprecated -> DirectiveUsages #

__type :: f Deprecated -> TypeCategory -> TypeData

GQLType Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Describe :: DerivingKind #

Methods

directives :: f Describe -> DirectiveUsages #

__type :: f Describe -> TypeCategory -> TypeData

GQLType DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND DropNamespace :: DerivingKind #

Methods

directives :: f DropNamespace -> DirectiveUsages #

__type :: f DropNamespace -> TypeCategory -> TypeData

GQLType Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Prefixes :: DerivingKind #

Methods

directives :: f Prefixes -> DirectiveUsages #

__type :: f Prefixes -> TypeCategory -> TypeData

GQLType Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Rename :: DerivingKind #

Methods

directives :: f Rename -> DirectiveUsages #

__type :: f Rename -> TypeCategory -> TypeData

GQLType InputTypeNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND InputTypeNamespace :: DerivingKind #

Methods

directives :: f InputTypeNamespace -> DirectiveUsages #

__type :: f InputTypeNamespace -> TypeCategory -> TypeData

GQLType Text 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND Text :: DerivingKind #

Methods

directives :: f Text -> DirectiveUsages #

__type :: f Text -> TypeCategory -> TypeData

GQLType () 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND () :: DerivingKind #

Methods

directives :: f () -> DirectiveUsages #

__type :: f () -> TypeCategory -> TypeData

GQLType Bool 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND Bool :: DerivingKind #

Methods

directives :: f Bool -> DirectiveUsages #

__type :: f Bool -> TypeCategory -> TypeData

GQLType Double 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND Double :: DerivingKind #

Methods

directives :: f Double -> DirectiveUsages #

__type :: f Double -> TypeCategory -> TypeData

GQLType Float 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND Float :: DerivingKind #

Methods

directives :: f Float -> DirectiveUsages #

__type :: f Float -> TypeCategory -> TypeData

GQLType Int 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND Int :: DerivingKind #

Methods

directives :: f Int -> DirectiveUsages #

__type :: f Int -> TypeCategory -> TypeData

GQLType a => GQLType (Seq a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Seq a) :: DerivingKind #

Methods

directives :: f (Seq a) -> DirectiveUsages #

__type :: f (Seq a) -> TypeCategory -> TypeData

GQLType a => GQLType (Set a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Set a) :: DerivingKind #

Methods

directives :: f (Set a) -> DirectiveUsages #

__type :: f (Set a) -> TypeCategory -> TypeData

GQLType a => GQLType (SubscriptionField a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (SubscriptionField a) :: DerivingKind #

Methods

directives :: f (SubscriptionField a) -> DirectiveUsages #

__type :: f (SubscriptionField a) -> TypeCategory -> TypeData

GQLType (Value CONST) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Value CONST) :: DerivingKind #

Methods

directives :: f (Value CONST) -> DirectiveUsages #

__type :: f (Value CONST) -> TypeCategory -> TypeData

Typeable m => GQLType (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Undefined m) :: DerivingKind #

Methods

directives :: f (Undefined m) -> DirectiveUsages #

__type :: f (Undefined m) -> TypeCategory -> TypeData

GQLType a => GQLType (Vector a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Vector a) :: DerivingKind #

Methods

directives :: f (Vector a) -> DirectiveUsages #

__type :: f (Vector a) -> TypeCategory -> TypeData

GQLType a => GQLType (NonEmpty a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (NonEmpty a) :: DerivingKind #

Methods

directives :: f (NonEmpty a) -> DirectiveUsages #

__type :: f (NonEmpty a) -> TypeCategory -> TypeData

GQLType a => GQLType (Maybe a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Maybe a) :: DerivingKind #

Methods

directives :: f (Maybe a) -> DirectiveUsages #

__type :: f (Maybe a) -> TypeCategory -> TypeData

GQLType a => GQLType [a] 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND [a] :: DerivingKind #

Methods

directives :: f [a] -> DirectiveUsages #

__type :: f [a] -> TypeCategory -> TypeData

GQLType a => GQLType (Proxy a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Proxy a) :: DerivingKind #

Methods

directives :: f (Proxy a) -> DirectiveUsages #

__type :: f (Proxy a) -> TypeCategory -> TypeData

(GQLType k, GQLType v, Typeable k, Typeable v, DeriveArguments TYPE InputTypeNamespace) => GQLType (Map k v) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Map k v) :: DerivingKind #

Methods

directives :: f (Map k v) -> DirectiveUsages #

__type :: f (Map k v) -> TypeCategory -> TypeData

GQLType a => GQLType (NamedResolverT m a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (NamedResolverT m a) :: DerivingKind #

Methods

directives :: f (NamedResolverT m a) -> DirectiveUsages #

__type :: f (NamedResolverT m a) -> TypeCategory -> TypeData

GQLType value => GQLType (Arg name value) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Arg name value) :: DerivingKind #

Methods

directives :: f (Arg name value) -> DirectiveUsages #

__type :: f (Arg name value) -> TypeCategory -> TypeData

(Typeable a, Typeable b, GQLType a, GQLType b, DeriveArguments TYPE InputTypeNamespace) => GQLType (Pair a b) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Pair a b) :: DerivingKind #

Methods

directives :: f (Pair a b) -> DirectiveUsages #

__type :: f (Pair a b) -> TypeCategory -> TypeData

GQLType interface => GQLType (TypeGuard interface possibleTypes) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (TypeGuard interface possibleTypes) :: DerivingKind #

Methods

directives :: f (TypeGuard interface possibleTypes) -> DirectiveUsages #

__type :: f (TypeGuard interface possibleTypes) -> TypeCategory -> TypeData

GQLType b => GQLType (a -> b) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (a -> b) :: DerivingKind #

Methods

directives :: f (a -> b) -> DirectiveUsages #

__type :: f (a -> b) -> TypeCategory -> TypeData

(Typeable a, Typeable b, GQLType a, GQLType b, DeriveArguments TYPE InputTypeNamespace) => GQLType (a, b) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (a, b) :: DerivingKind #

Methods

directives :: f (a, b) -> DirectiveUsages #

__type :: f (a, b) -> TypeCategory -> TypeData

GQLType a => GQLType (Resolver o e m a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Resolver o e m a) :: DerivingKind #

Methods

directives :: f (Resolver o e m a) -> DirectiveUsages #

__type :: f (Resolver o e m a) -> TypeCategory -> TypeData

class EncodeScalar a where #

GraphQL Scalar Serializer

Methods

encodeScalar :: a -> ScalarValue #

Instances

Instances details
EncodeScalar ID 
Instance details

Defined in Data.Morpheus.Types.ID

EncodeScalar Text 
Instance details

Defined in Data.Morpheus.Types.GQLScalar

EncodeScalar Bool 
Instance details

Defined in Data.Morpheus.Types.GQLScalar

EncodeScalar Double 
Instance details

Defined in Data.Morpheus.Types.GQLScalar

EncodeScalar Float 
Instance details

Defined in Data.Morpheus.Types.GQLScalar

EncodeScalar Int 
Instance details

Defined in Data.Morpheus.Types.GQLScalar

class EncodeWrapper (wrapper :: Type -> Type) where #

GraphQL Wrapper Serializer

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> wrapper a -> m (ResolverValue m) #

Instances

Instances details
EncodeWrapper Seq 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> Seq a -> m (ResolverValue m) #

EncodeWrapper Set 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> Set a -> m (ResolverValue m) #

EncodeWrapper SubscriptionField 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> SubscriptionField a -> m (ResolverValue m) #

EncodeWrapper Vector 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> Vector a -> m (ResolverValue m) #

EncodeWrapper NonEmpty 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> NonEmpty a -> m (ResolverValue m) #

EncodeWrapper Maybe 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> Maybe a -> m (ResolverValue m) #

EncodeWrapper [] 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> [a] -> m (ResolverValue m) #

class DecodeScalar a where #

GraphQL Scalar parser

class DecodeWrapper (f :: Type -> Type) where #

GraphQL Wrapper Deserializer

Methods

decodeWrapper :: (Monad m, DecodeWrapperConstraint f a) => (ValidValue -> m a) -> ValidValue -> ExceptT GQLError m (f a) #

data GQLRequest #

GraphQL HTTP Request Body

Instances

Instances details
FromJSON GQLRequest 
Instance details

Defined in Data.Morpheus.Types.IO

ToJSON GQLRequest 
Instance details

Defined in Data.Morpheus.Types.IO

Generic GQLRequest 
Instance details

Defined in Data.Morpheus.Types.IO

Associated Types

type Rep GQLRequest :: Type -> Type #

Show GQLRequest 
Instance details

Defined in Data.Morpheus.Types.IO

MapAPI GQLRequest GQLResponse 
Instance details

Defined in Data.Morpheus.App.MapAPI

type Rep GQLRequest 
Instance details

Defined in Data.Morpheus.Types.IO

type Rep GQLRequest = D1 ('MetaData "GQLRequest" "Data.Morpheus.Types.IO" "morpheus-graphql-core-0.26.0-2wGrXlNRLTe5vfWyZ5pTRN" 'False) (C1 ('MetaCons "GQLRequest" 'PrefixI 'True) (S1 ('MetaSel ('Just "operationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FieldName)) :*: (S1 ('MetaSel ('Just "query") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "variables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Value)))))

data GQLResponse #

GraphQL Response

Constructors

Data ValidValue 
Errors [GQLError] 

Instances

Instances details
FromJSON GQLResponse 
Instance details

Defined in Data.Morpheus.Types.IO

ToJSON GQLResponse 
Instance details

Defined in Data.Morpheus.Types.IO

Generic GQLResponse 
Instance details

Defined in Data.Morpheus.Types.IO

Associated Types

type Rep GQLResponse :: Type -> Type #

Show GQLResponse 
Instance details

Defined in Data.Morpheus.Types.IO

MapAPI GQLRequest GQLResponse 
Instance details

Defined in Data.Morpheus.App.MapAPI

type Rep GQLResponse 
Instance details

Defined in Data.Morpheus.Types.IO

type Rep GQLResponse = D1 ('MetaData "GQLResponse" "Data.Morpheus.Types.IO" "morpheus-graphql-core-0.26.0-2wGrXlNRLTe5vfWyZ5pTRN" 'False) (C1 ('MetaCons "Data" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ValidValue)) :+: C1 ('MetaCons "Errors" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [GQLError])))

newtype ID #

default GraphQL type, parses only ScalarValue and ScalarValue values, serialized always as ScalarValue

Constructors

ID 

Fields

Instances

Instances details
FromJSON ID 
Instance details

Defined in Data.Morpheus.Types.ID

ToJSON ID 
Instance details

Defined in Data.Morpheus.Types.ID

IsString ID 
Instance details

Defined in Data.Morpheus.Types.ID

Methods

fromString :: String -> ID #

Semigroup ID 
Instance details

Defined in Data.Morpheus.Types.ID

Methods

(<>) :: ID -> ID -> ID #

sconcat :: NonEmpty ID -> ID #

stimes :: Integral b => b -> ID -> ID #

Generic ID 
Instance details

Defined in Data.Morpheus.Types.ID

Associated Types

type Rep ID :: Type -> Type #

Methods

from :: ID -> Rep ID x #

to :: Rep ID x -> ID #

Show ID 
Instance details

Defined in Data.Morpheus.Types.ID

Methods

showsPrec :: Int -> ID -> ShowS #

show :: ID -> String #

showList :: [ID] -> ShowS #

Eq ID 
Instance details

Defined in Data.Morpheus.Types.ID

Methods

(==) :: ID -> ID -> Bool #

(/=) :: ID -> ID -> Bool #

Hashable ID 
Instance details

Defined in Data.Morpheus.Types.ID

Methods

hashWithSalt :: Int -> ID -> Int #

hash :: ID -> Int #

DecodeScalar ID 
Instance details

Defined in Data.Morpheus.Types.ID

EncodeScalar ID 
Instance details

Defined in Data.Morpheus.Types.ID

GQLType ID 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND ID :: DerivingKind #

Methods

directives :: f ID -> DirectiveUsages #

__type :: f ID -> TypeCategory -> TypeData

type Rep ID 
Instance details

Defined in Data.Morpheus.Types.ID

type Rep ID = D1 ('MetaData "ID" "Data.Morpheus.Types.ID" "morpheus-graphql-core-0.26.0-2wGrXlNRLTe5vfWyZ5pTRN" 'True) (C1 ('MetaCons "ID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unpackID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type KIND ID 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

type KIND ID = SCALAR

data ScalarValue #

Primitive Values for GQLScalar: ScalarValue, ScalarValue, ScalarValue, Boolean. for performance reason type Text represents GraphQl ScalarValue value

Instances

Instances details
FromJSON ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

ToJSON ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

IsString ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Generic ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Associated Types

type Rep ScalarValue :: Type -> Type #

Show ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Eq ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

RenderGQL ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Methods

renderGQL :: ScalarValue -> Rendering #

Lift ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Methods

lift :: Quote m => ScalarValue -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => ScalarValue -> Code m ScalarValue #

type Rep ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

data RootResolver (m :: Type -> Type) event (query :: (Type -> Type) -> Type) (mutation :: (Type -> Type) -> Type) (subscription :: (Type -> Type) -> Type) #

GraphQL Root resolver, also the interpreter generates a GQL schema from it. queryResolver is required, mutationResolver and subscriptionResolver are optional, if your schema does not supports mutation or subscription , you can use () for it.

Constructors

RootResolver 

Fields

Instances

Instances details
RootResolverConstraint m e query mut sub => DeriveApp RootResolver m e query mut sub 
Instance details

Defined in Data.Morpheus.Server.Deriving.App

Methods

deriveApp :: RootResolver m e query mut sub -> App e m #

constRes :: forall (o :: OperationType) (m :: Type -> Type) b a e. (WithOperation o, Monad m) => b -> a -> Resolver o e m b #

data Undefined (m :: Type -> Type) #

Instances

Instances details
Generic (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

Associated Types

type Rep (Undefined m) :: Type -> Type #

Methods

from :: Undefined m -> Rep (Undefined m) x #

to :: Rep (Undefined m) x -> Undefined m #

Show (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

Typeable m => GQLType (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Undefined m) :: DerivingKind #

Methods

directives :: f (Undefined m) -> DirectiveUsages #

__type :: f (Undefined m) -> TypeCategory -> TypeData

type Rep (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

type Rep (Undefined m) = D1 ('MetaData "Undefined" "Data.Morpheus.Server.Types.Types" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "Undefined" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))
type KIND (Undefined m) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

type KIND (Undefined m) = CUSTOM

data Resolver (o :: OperationType) event (m :: Type -> Type) value #

Instances

Instances details
DeriveType cat a => DeriveKindedType cat CUSTOM (Resolver o e m a :: Type) 
Instance details

Defined in Data.Morpheus.Server.Deriving.Schema

Methods

deriveKindedType :: kinded CUSTOM (Resolver o e m a) -> SchemaT cat ()

deriveKindedContent :: kinded CUSTOM (Resolver o e m a) -> TyContentM cat

Monad m => PushEvents e (Resolver MUTATION e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

pushEvents :: [e] -> Resolver MUTATION e m () #

(LiftOperation o, Monad m) => MonadError GQLError (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

throwError :: GQLError -> Resolver o e m a #

catchError :: Resolver o e m a -> (GQLError -> Resolver o e m a) -> Resolver o e m a #

(LiftOperation o, Monad m) => MonadReader ResolverContext (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

ask :: Resolver o e m ResolverContext #

local :: (ResolverContext -> ResolverContext) -> Resolver o e m a -> Resolver o e m a #

reader :: (ResolverContext -> a) -> Resolver o e m a #

LiftOperation o => MonadTrans (Resolver o e) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

lift :: Monad m => m a -> Resolver o e m a #

(Monad m, LiftOperation o) => MonadFail (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

fail :: String -> Resolver o e m a #

(MonadIO m, LiftOperation o) => MonadIO (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

liftIO :: IO a -> Resolver o e m a #

(LiftOperation o, Monad m) => Applicative (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

pure :: a -> Resolver o e m a #

(<*>) :: Resolver o e m (a -> b) -> Resolver o e m a -> Resolver o e m b #

liftA2 :: (a -> b -> c) -> Resolver o e m a -> Resolver o e m b -> Resolver o e m c #

(*>) :: Resolver o e m a -> Resolver o e m b -> Resolver o e m b #

(<*) :: Resolver o e m a -> Resolver o e m b -> Resolver o e m a #

Functor m => Functor (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

fmap :: (a -> b) -> Resolver o e m a -> Resolver o e m b #

(<$) :: a -> Resolver o e m b -> Resolver o e m a #

(Monad m, LiftOperation o) => Monad (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

(>>=) :: Resolver o e m a -> (a -> Resolver o e m b) -> Resolver o e m b #

(>>) :: Resolver o e m a -> Resolver o e m b -> Resolver o e m b #

return :: a -> Resolver o e m a #

(Monad m, Semigroup a, LiftOperation o) => Semigroup (Resolver o e m a) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

(<>) :: Resolver o e m a -> Resolver o e m a -> Resolver o e m a #

sconcat :: NonEmpty (Resolver o e m a) -> Resolver o e m a #

stimes :: Integral b => b -> Resolver o e m a -> Resolver o e m a #

Show (Resolver o e m value) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

showsPrec :: Int -> Resolver o e m value -> ShowS #

show :: Resolver o e m value -> String #

showList :: [Resolver o e m value] -> ShowS #

GQLType a => GQLType (Resolver o e m a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Resolver o e m a) :: DerivingKind #

Methods

directives :: f (Resolver o e m a) -> DirectiveUsages #

__type :: f (Resolver o e m a) -> TypeCategory -> TypeData

type KIND (Resolver o e m a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

type KIND (Resolver o e m a) = CUSTOM

type QUERY = 'Query #

lift :: (MonadTrans t, Monad m) => m a -> t m a #

Lift a computation from the argument monad to the constructed monad.

liftEither :: (MonadTrans t, Monad (t m), MonadError GQLError (t m)) => Monad m => m (Either String a) -> t m a Source #

publish :: forall (m :: Type -> Type) e. Monad m => [e] -> Resolver MUTATION e m () #

subscribe :: forall (m :: Type -> Type) e a. Monad m => Channel e -> Resolver QUERY e m (e -> Resolver SUBSCRIPTION e m a) -> SubscriptionField (Resolver SUBSCRIPTION e m a) #

data ResolverContext #

Instances

Instances details
Show ResolverContext 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.ResolverState

Monad m => MonadReader ResolverContext (ResolverStateT event m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.ResolverState

Methods

ask :: ResolverStateT event m ResolverContext #

local :: (ResolverContext -> ResolverContext) -> ResolverStateT event m a -> ResolverStateT event m a #

reader :: (ResolverContext -> a) -> ResolverStateT event m a #

(LiftOperation o, Monad m) => MonadReader ResolverContext (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

ask :: Resolver o e m ResolverContext #

local :: (ResolverContext -> ResolverContext) -> Resolver o e m a -> Resolver o e m a #

reader :: (ResolverContext -> a) -> Resolver o e m a #

type ResolverO (o :: OperationType) e (m :: Type -> Type) (a :: k) = Flexible (Resolver o e m) a #

type ComposedResolver (o :: OperationType) e (m :: Type -> Type) (f :: Type -> Type) (a :: k) = Composed (Resolver o e m) f a #

type ResolverQ e (m :: Type -> Type) (a :: k) = Flexible (Resolver QUERY e m) a #

type ResolverM e (m :: Type -> Type) (a :: k) = Flexible (Resolver MUTATION e m) a #

type ResolverS e (m :: Type -> Type) (a :: k) = Flexible (Resolver SUBSCRIPTION e m) a #

data SubscriptionField a #

Instances

Instances details
EncodeWrapper SubscriptionField 
Instance details

Defined in Data.Morpheus.Types.GQLWrapper

Methods

encodeWrapper :: Monad m => (a -> m (ResolverValue m)) -> SubscriptionField a -> m (ResolverValue m) #

GQLType a => GQLType (SubscriptionField a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (SubscriptionField a) :: DerivingKind #

Methods

directives :: f (SubscriptionField a) -> DirectiveUsages #

__type :: f (SubscriptionField a) -> TypeCategory -> TypeData

type KIND (SubscriptionField a) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

data App event (m :: Type -> Type) #

Instances

Instances details
Monad m => Semigroup (App e m) 
Instance details

Defined in Data.Morpheus.App

Methods

(<>) :: App e m -> App e m -> App e m #

sconcat :: NonEmpty (App e m) -> App e m #

stimes :: Integral b => b -> App e m -> App e m #

RenderGQL (App e m) 
Instance details

Defined in Data.Morpheus.App

Methods

renderGQL :: App e m -> Rendering #

class RenderGQL a #

Minimal complete definition

renderGQL

Instances

Instances details
RenderGQL Value 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Value -> Rendering #

RenderGQL ByteString 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: ByteString -> Rendering #

RenderGQL DirectiveLocation 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation

Methods

renderGQL :: DirectiveLocation -> Rendering #

RenderGQL OperationType 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.OperationType

Methods

renderGQL :: OperationType -> Rendering #

RenderGQL UnionTag 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

Methods

renderGQL :: UnionTag -> Rendering #

RenderGQL RootOperationTypeDefinition 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Methods

renderGQL :: RootOperationTypeDefinition -> Rendering #

RenderGQL SchemaDefinition 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Methods

renderGQL :: SchemaDefinition -> Rendering #

RenderGQL ScalarValue 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Methods

renderGQL :: ScalarValue -> Rendering #

RenderGQL Text 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Text -> Rendering #

RenderGQL Bool 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Bool -> Rendering #

RenderGQL Double 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Double -> Rendering #

RenderGQL Float 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Float -> Rendering #

RenderGQL Int 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Int -> Rendering #

RenderGQL (Name a) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Name

Methods

renderGQL :: Name a -> Rendering #

RenderGQL (Operation VALID) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

Methods

renderGQL :: Operation VALID -> Rendering #

RenderGQL (Selection VALID) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

Methods

renderGQL :: Selection VALID -> Rendering #

RenderGQL (SelectionContent VALID) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

Methods

renderGQL :: SelectionContent VALID -> Rendering #

RenderGQL (DataEnumValue s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Methods

renderGQL :: DataEnumValue s -> Rendering #

RenderGQL (Schema s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Methods

renderGQL :: Schema s -> Rendering #

RenderGQL (ObjectEntry a) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Methods

renderGQL :: ObjectEntry a -> Rendering #

RenderGQL (Value a) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

Methods

renderGQL :: Value a -> Rendering #

RenderGQL a => RenderGQL (Maybe a) 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Maybe a -> Rendering #

(RenderGQL l, RenderGQL r) => RenderGQL (Either l r) 
Instance details

Defined in Data.Morpheus.Rendering.RenderGQL

Methods

renderGQL :: Either l r -> Rendering #

RenderGQL (App e m) 
Instance details

Defined in Data.Morpheus.App

Methods

renderGQL :: App e m -> Rendering #

RenderGQL (TypeDefinition a s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Methods

renderGQL :: TypeDefinition a s -> Rendering #

RenderGQL (AppData e m s) 
Instance details

Defined in Data.Morpheus.App

Methods

renderGQL :: AppData e m s -> Rendering #

data TypeGuard interface union #

Constructors

ResolveInterface interface 
ResolveType union 

Instances

Instances details
(DeriveTypeConstraint OUT interface, DeriveTypeConstraint OUT union) => DeriveKindedType OUT CUSTOM (TypeGuard interface union :: Type) 
Instance details

Defined in Data.Morpheus.Server.Deriving.Schema

Methods

deriveKindedType :: kinded CUSTOM (TypeGuard interface union) -> SchemaT OUT ()

deriveKindedContent :: kinded CUSTOM (TypeGuard interface union) -> TyContentM OUT

GQLType interface => GQLType (TypeGuard interface possibleTypes) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (TypeGuard interface possibleTypes) :: DerivingKind #

Methods

directives :: f (TypeGuard interface possibleTypes) -> DirectiveUsages #

__type :: f (TypeGuard interface possibleTypes) -> TypeCategory -> TypeData

type KIND (TypeGuard interface possibleTypes) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

type KIND (TypeGuard interface possibleTypes) = CUSTOM

newtype Arg (name :: Symbol) a #

Constructors

Arg 

Fields

Instances

Instances details
Generic (Arg name a) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

Associated Types

type Rep (Arg name a) :: Type -> Type #

Methods

from :: Arg name a -> Rep (Arg name a) x #

to :: Rep (Arg name a) x -> Arg name a #

Show a => Show (Arg name a) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

Methods

showsPrec :: Int -> Arg name a -> ShowS #

show :: Arg name a -> String #

showList :: [Arg name a] -> ShowS #

GQLType value => GQLType (Arg name value) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

Associated Types

type KIND (Arg name value) :: DerivingKind #

Methods

directives :: f (Arg name value) -> DirectiveUsages #

__type :: f (Arg name value) -> TypeCategory -> TypeData

type Rep (Arg name a) 
Instance details

Defined in Data.Morpheus.Server.Types.Types

type Rep (Arg name a) = D1 ('MetaData "Arg" "Data.Morpheus.Server.Types.Types" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "Arg" 'PrefixI 'True) (S1 ('MetaSel ('Just "argValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))
type KIND (Arg name value) 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

type KIND (Arg name value) = CUSTOM

data NamedResolvers (m :: Type -> Type) event (qu :: (Type -> Type) -> Type) (mu :: (Type -> Type) -> Type) (su :: (Type -> Type) -> Type) #

Constructors

ResolveNamed (Resolver QUERY event m) (qu (NamedResolverT (Resolver QUERY event m))) => NamedResolvers 

Instances

Instances details
NamedResolversConstraint m e query mut sub => DeriveApp NamedResolvers m e query mut sub 
Instance details

Defined in Data.Morpheus.Server.Deriving.App

Methods

deriveApp :: NamedResolvers m e query mut sub -> App e m #

GQLType naming configuration

GQL directives API

data Prefixes #

a custom GraphQL directive for adding or removing of prefixes

Constructors

Prefixes 

Instances

Instances details
Generic Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep Prefixes :: Type -> Type #

Methods

from :: Prefixes -> Rep Prefixes x #

to :: Rep Prefixes x -> Prefixes #

GQLDirective Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLType Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Prefixes :: DerivingKind #

Methods

directives :: f Prefixes -> DirectiveUsages #

__type :: f Prefixes -> TypeCategory -> TypeData

VisitType Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Prefixes = D1 ('MetaData "Prefixes" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'False) (C1 ('MetaCons "Prefixes" 'PrefixI 'True) (S1 ('MetaSel ('Just "addPrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "removePrefix") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type DIRECTIVE_LOCATIONS Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

class VisitType a where #

Minimal complete definition

Nothing

Methods

visitTypeName :: a -> Bool -> Text -> Text #

Construct a new type name depending on whether it is an input, and being given the original type name.

visitTypeDescription :: a -> Maybe Text -> Maybe Text #

visitFieldNames :: a -> Text -> Text #

Function applied to field labels. Handy for removing common record prefixes for example.

visitEnumNames :: a -> Text -> Text #

Function applied to enum values Handy for removing common enum prefixes for example.

Instances

Instances details
VisitType Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType InputTypeNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

newtype Describe #

Constructors

Describe 

Fields

Instances

Instances details
Generic Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep Describe :: Type -> Type #

Methods

from :: Describe -> Rep Describe x #

to :: Rep Describe x -> Describe #

GQLDirective Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLType Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Describe :: DerivingKind #

Methods

directives :: f Describe -> DirectiveUsages #

__type :: f Describe -> TypeCategory -> TypeData

VisitEnum Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitField Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Describe = D1 ('MetaData "Describe" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "Describe" 'PrefixI 'True) (S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type DIRECTIVE_LOCATIONS Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

typeDirective :: TypeDirectiveConstraint a => a -> DirectiveUsages #

fieldDirective :: TypeDirectiveConstraint a => FieldName -> a -> DirectiveUsages #

enumDirective :: TypeDirectiveConstraint a => TypeName -> a -> DirectiveUsages #

default GQL directives

class (Typeable a, WITH_VISITOR a VISIT_TYPE TYPE_VISITOR_KIND, WITH_VISITOR a VISIT_FIELD FIELD_VISITOR_KIND, WITH_VISITOR a VISIT_ENUM ENUM_VISITOR_KIND) => GQLDirective a where #

Minimal complete definition

Nothing

Associated Types

type DIRECTIVE_LOCATIONS a :: [DirectiveLocation] #

Methods

excludeFromSchema :: f a -> Bool #

Instances

Instances details
GQLDirective DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLDirective Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLDirective Describe 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLDirective DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLDirective Prefixes 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLDirective Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type DIRECTIVE_LOCATIONS Rename :: [DirectiveLocation] #

GQLDirective InputTypeNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.GQLType

newtype Deprecated #

Constructors

Deprecated 

Fields

Instances

Instances details
Generic Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep Deprecated :: Type -> Type #

GQLDirective Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLType Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Deprecated :: DerivingKind #

Methods

directives :: f Deprecated -> DirectiveUsages #

__type :: f Deprecated -> TypeCategory -> TypeData

VisitEnum Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitField Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Deprecated = D1 ('MetaData "Deprecated" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "Deprecated" 'PrefixI 'True) (S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))
type DIRECTIVE_LOCATIONS Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND Deprecated 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

newtype DropNamespace #

Constructors

DropNamespace 

Fields

Instances

Instances details
Generic DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep DropNamespace :: Type -> Type #

GQLDirective DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLType DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND DropNamespace :: DerivingKind #

Methods

directives :: f DropNamespace -> DirectiveUsages #

__type :: f DropNamespace -> TypeCategory -> TypeData

VisitType DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep DropNamespace = D1 ('MetaData "DropNamespace" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "DropNamespace" 'PrefixI 'True) (S1 ('MetaSel ('Just "dropNamespace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type DIRECTIVE_LOCATIONS DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND DropNamespace 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

newtype Rename #

a custom GraphQL directive for adding or removing of prefixes

Constructors

Rename 

Fields

Instances

Instances details
Generic Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep Rename :: Type -> Type #

Methods

from :: Rename -> Rep Rename x #

to :: Rep Rename x -> Rename #

GQLDirective Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type DIRECTIVE_LOCATIONS Rename :: [DirectiveLocation] #

GQLType Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND Rename :: DerivingKind #

Methods

directives :: f Rename -> DirectiveUsages #

__type :: f Rename -> TypeCategory -> TypeData

VisitEnum Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitField Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

VisitType Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep Rename = D1 ('MetaData "Rename" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "Rename" 'PrefixI 'True) (S1 ('MetaSel ('Just "newName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))
type DIRECTIVE_LOCATIONS Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND Rename 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

newtype DefaultValue #

Constructors

DefaultValue 

Instances

Instances details
Generic DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type Rep DefaultValue :: Type -> Type #

GQLDirective DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

GQLType DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

Associated Types

type KIND DefaultValue :: DerivingKind #

Methods

directives :: f DefaultValue -> DirectiveUsages #

__type :: f DefaultValue -> TypeCategory -> TypeData

VisitField DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type Rep DefaultValue = D1 ('MetaData "DefaultValue" "Data.Morpheus.Server.Types.DirectiveDefinitions" "morpheus-graphql-server-0.26.0-4tTPfw3YNTADVcrz7QwjPr" 'True) (C1 ('MetaCons "DefaultValue" 'PrefixI 'True) (S1 ('MetaSel ('Just "defaultValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Value CONST))))
type DIRECTIVE_LOCATIONS DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

type KIND DefaultValue 
Instance details

Defined in Data.Morpheus.Server.Types.DirectiveDefinitions

data GQLError #

Instances

Instances details
FromJSON GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

ToJSON GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

IsString GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Semigroup GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Generic GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Associated Types

type Rep GQLError :: Type -> Type #

Methods

from :: GQLError -> Rep GQLError x #

to :: Rep GQLError x -> GQLError #

Show GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Eq GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Ord GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Msg GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

Methods

msg :: GQLError -> GQLError #

NameCollision GQLError RootOperationTypeDefinition 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

NameCollision GQLError SchemaDefinition 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

NameCollision GQLError (Fragment s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Selection

NameCollision GQLError (ObjectEntry s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

NameCollision GQLError (Variable s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Value

NameCollision GQLError (TypeDefinition cat s) 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.TypeSystem

Monad m => MonadError GQLError (ResolverStateT e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.ResolverState

Methods

throwError :: GQLError -> ResolverStateT e m a #

catchError :: ResolverStateT e m a -> (GQLError -> ResolverStateT e m a) -> ResolverStateT e m a #

(LiftOperation o, Monad m) => MonadError GQLError (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

throwError :: GQLError -> Resolver o e m a #

catchError :: Resolver o e m a -> (GQLError -> Resolver o e m a) -> Resolver o e m a #

type Rep GQLError 
Instance details

Defined in Data.Morpheus.Types.Internal.AST.Error

type Rep GQLError = D1 ('MetaData "GQLError" "Data.Morpheus.Types.Internal.AST.Error" "morpheus-graphql-core-0.26.0-2wGrXlNRLTe5vfWyZ5pTRN" 'False) (C1 ('MetaCons "GQLError" 'PrefixI 'True) ((S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Message) :*: S1 ('MetaSel ('Just "locations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Position]))) :*: (S1 ('MetaSel ('Just "path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [PropName])) :*: (S1 ('MetaSel ('Just "errorType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ErrorType)) :*: S1 ('MetaSel ('Just "extensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Map Text Value)))))))

class Monad m => MonadError e (m :: Type -> Type) | m -> e #

The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.

Is parameterized over the type of error information and the monad type constructor. It is common to use Either String as the monad type constructor for an error monad in which error descriptions take the form of strings. In that case and many other common cases the resulting monad is already defined as an instance of the MonadError class. You can also define your own error type and/or use a monad type constructor other than Either String or Either IOError. In these cases you will have to explicitly define instances of the MonadError class. (If you are using the deprecated Control.Monad.Error or Control.Monad.Trans.Error, you may also have to define an Error instance.)

Minimal complete definition

throwError, catchError

Instances

Instances details
MonadError IOException IO 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: IOException -> IO a #

catchError :: IO a -> (IOException -> IO a) -> IO a #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a #

MonadError e (Either e) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> Either e a #

catchError :: Either e a -> (e -> Either e a) -> Either e a #

MonadError e m => MonadError e (ListT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ListT m a #

catchError :: ListT m a -> (e -> ListT m a) -> ListT m a #

MonadError e m => MonadError e (MaybeT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> MaybeT m a #

catchError :: MaybeT m a -> (e -> MaybeT m a) -> MaybeT m a #

Monad m => MonadError GQLError (ResolverStateT e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.ResolverState

Methods

throwError :: GQLError -> ResolverStateT e m a #

catchError :: ResolverStateT e m a -> (GQLError -> ResolverStateT e m a) -> ResolverStateT e m a #

(Monad m, Error e) => MonadError e (ErrorT e m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ErrorT e m a #

catchError :: ErrorT e m a -> (e -> ErrorT e m a) -> ErrorT e m a #

Monad m => MonadError e (ExceptT e m)

Since: mtl-2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ExceptT e m a #

catchError :: ExceptT e m a -> (e -> ExceptT e m a) -> ExceptT e m a #

MonadError e m => MonadError e (IdentityT m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> IdentityT m a #

catchError :: IdentityT m a -> (e -> IdentityT m a) -> IdentityT m a #

MonadError e m => MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ReaderT r m a #

catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a #

MonadError e m => MonadError e (StateT s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> StateT s m a #

catchError :: StateT s m a -> (e -> StateT s m a) -> StateT s m a #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(Monoid w, MonadError e m) => MonadError e (WriterT w m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> WriterT w m a #

catchError :: WriterT w m a -> (e -> WriterT w m a) -> WriterT w m a #

(LiftOperation o, Monad m) => MonadError GQLError (Resolver o e m) 
Instance details

Defined in Data.Morpheus.App.Internal.Resolving.Resolver

Methods

throwError :: GQLError -> Resolver o e m a #

catchError :: Resolver o e m a -> (GQLError -> Resolver o e m a) -> Resolver o e m a #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> RWST r w s m a #

catchError :: RWST r w s m a -> (e -> RWST r w s m a) -> RWST r w s m a #