Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class ToJSON (Dep a) => ResolveNamed (m :: Type -> Type) a where
- type Dep a :: Type
- resolveNamed :: Monad m => Dep a -> m a
- data NamedResolverT (m :: Type -> Type) a where
- Ref :: ResolveNamed m a => m (Dep a) -> NamedResolverT m a
- Refs :: ResolveNamed m a => m [Dep a] -> NamedResolverT m [a]
- Value :: m a -> NamedResolverT m a
- resolve :: forall m a b. ResolveByType (RES_TYPE a b) m a b => Monad m => m a -> NamedResolverT m b
- data NamedResolvers (m :: Type -> Type) event (qu :: (Type -> Type) -> Type) (mu :: (Type -> Type) -> Type) (su :: (Type -> Type) -> Type) = ResolveNamed (Resolver QUERY event m) (qu (NamedResolverT (Resolver QUERY event m))) => NamedResolvers
- data RootResolver (m :: Type -> Type) event (query :: (Type -> Type) -> Type) (mutation :: (Type -> Type) -> Type) (subscription :: (Type -> Type) -> Type) = RootResolver {
- queryResolver :: query (Resolver QUERY event m)
- mutationResolver :: mutation (Resolver MUTATION event m)
- subscriptionResolver :: subscription (Resolver SUBSCRIPTION event m)
- defaultRootResolver :: RootResolver m event Undefined Undefined Undefined
- type ResolverO o e m a = Flexible (Resolver o e m) a
- type ComposedResolver o e m f a = Composed (Resolver o e m) f a
- publish :: Monad m => [e] -> Resolver MUTATION e m ()
- constRes :: (WithOperation o, Monad m) => b -> a -> Resolver o e m b
- type ResolverQ e m a = Flexible (Resolver QUERY e m) a
- type ResolverM e m a = Flexible (Resolver MUTATION e m) a
- type ResolverS e m a = Flexible (Resolver SUBSCRIPTION e m) a
Documentation
class ToJSON (Dep a) => ResolveNamed (m :: Type -> Type) a where Source #
resolveNamed :: Monad m => Dep a -> m a Source #
Instances
Monad m => ResolveNamed m ID Source # | |
Monad m => ResolveNamed m Text Source # | |
ResolveNamed m a => ResolveNamed m (Maybe a) Source # | |
ResolveNamed m a => ResolveNamed m [a] Source # | |
Defined in Data.Morpheus.Server.NamedResolvers resolveNamed :: Dep [a] -> m [a] Source # |
data NamedResolverT (m :: Type -> Type) a where Source #
Ref :: ResolveNamed m a => m (Dep a) -> NamedResolverT m a | |
Refs :: ResolveNamed m a => m [Dep a] -> NamedResolverT m [a] | |
Value :: m a -> NamedResolverT m a |
Instances
GQLType a => GQLType (NamedResolverT m a) Source # | |
Defined in Data.Morpheus.Server.Types.GQLType type KIND (NamedResolverT m a) :: DerivingKind Source # description :: f (NamedResolverT m a) -> Maybe Text Source # directives :: f (NamedResolverT m a) -> DirectiveUsages Source # getDescriptions :: f (NamedResolverT m a) -> Map Text Description Source # typeOptions :: f (NamedResolverT m a) -> GQLTypeOptions -> GQLTypeOptions Source # getDirectives :: f (NamedResolverT m a) -> Map Text (Directives CONST) Source # defaultValues :: f (NamedResolverT m a) -> Map Text (Value CONST) Source # __type :: f (NamedResolverT m a) -> TypeCategory -> TypeData | |
type KIND (NamedResolverT m a) Source # | |
Defined in Data.Morpheus.Server.Types.GQLType |
resolve :: forall m a b. ResolveByType (RES_TYPE a b) m a b => Monad m => m a -> NamedResolverT m b Source #
data NamedResolvers (m :: Type -> Type) event (qu :: (Type -> Type) -> Type) (mu :: (Type -> Type) -> Type) (su :: (Type -> Type) -> Type) Source #
ResolveNamed (Resolver QUERY event m) (qu (NamedResolverT (Resolver QUERY event m))) => NamedResolvers |
data RootResolver (m :: Type -> Type) event (query :: (Type -> Type) -> Type) (mutation :: (Type -> Type) -> Type) (subscription :: (Type -> Type) -> Type) Source #
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.
RootResolver | |
|
defaultRootResolver :: RootResolver m event Undefined Undefined Undefined Source #
type ComposedResolver o e m f a = Composed (Resolver o e m) f a Source #
type ResolverS e m a = Flexible (Resolver SUBSCRIPTION e m) a Source #