Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Data.Morpheus.Core
Synopsis
- data Config = Config {}
- class RenderGQL a where
- renderGQL :: a -> Rendering
- class SelectionTree node where
- type ChildNode node :: Type
- isLeaf :: node -> Bool
- getName :: IsString name => node -> name
- getChildrenList :: node -> [ChildNode node]
- getChildren :: node -> [ChildNode node]
- getChild :: ToString name => name -> node -> Maybe (ChildNode node)
- hasChild :: ToString name => name -> node -> Bool
- getArguments :: IsString name => node -> [(name, Value)]
- getArgument :: ToString name => name -> node -> Maybe Value
- data VALIDATION_MODE
- class ValidateSchema s where
- debugConfig :: Config
- defaultConfig :: Config
- internalSchema :: Schema s
- parseFullSchema :: ByteString -> GQLResult (Schema VALID)
- parseRequest :: GQLRequest -> GQLResult ExecutableDocument
- parseRequestWith :: Config -> Schema VALID -> GQLRequest -> GQLResult (Operation VALID)
- parseSchema :: ByteString -> GQLResult (Schema VALID)
- parseTypeDefinitions :: ByteString -> GQLResult [TypeDefinition ANY CONST]
- render :: RenderGQL a => a -> ByteString
- validateRequest :: Config -> Schema VALID -> ExecutableDocument -> GQLResult (Operation VALID)
- parseDefinitions :: ByteString -> GQLResult [RawTypeDefinition]
Documentation
Constructors
Config | |
Fields
|
class RenderGQL a where Source #
Instances
class SelectionTree node where Source #
The SelectionTree
instance is a simple interface for interacting
with morpheus's internal AST while keeping the ability to safely change the concrete
representation of the AST.
Minimal complete definition
isLeaf, getName, getChildren, getChild, getArguments, getArgument
Methods
isLeaf :: node -> Bool Source #
leaf test: is the list of children empty?
getName :: IsString name => node -> name Source #
get a node's name (real name. not alias)
getChildrenList :: node -> [ChildNode node] Source #
Get the children
getChildren :: node -> [ChildNode node] Source #
get the child nodes
getChild :: ToString name => name -> node -> Maybe (ChildNode node) Source #
lookup child node by name (does not use aliases)
hasChild :: ToString name => name -> node -> Bool Source #
checks if the node has a child with the specified name (does not use aliases)
getArguments :: IsString name => node -> [(name, Value)] Source #
get node arguments (as aeson values)
getArgument :: ToString name => name -> node -> Maybe Value Source #
get node argument by name (as aeson values)
Instances
data VALIDATION_MODE Source #
Constructors
WITHOUT_VARIABLES | |
FULL_VALIDATION |
Instances
Show VALIDATION_MODE Source # | |
Defined in Data.Morpheus.Types.Internal.Config Methods showsPrec :: Int -> VALIDATION_MODE -> ShowS # show :: VALIDATION_MODE -> String # showList :: [VALIDATION_MODE] -> ShowS # | |
Eq VALIDATION_MODE Source # | |
Defined in Data.Morpheus.Types.Internal.Config Methods (==) :: VALIDATION_MODE -> VALIDATION_MODE -> Bool # (/=) :: VALIDATION_MODE -> VALIDATION_MODE -> Bool # |
class ValidateSchema s where Source #
Instances
debugConfig :: Config Source #
internalSchema :: Schema s Source #
parseFullSchema :: ByteString -> GQLResult (Schema VALID) Source #
parseRequestWith :: Config -> Schema VALID -> GQLRequest -> GQLResult (Operation VALID) Source #
parseSchema :: ByteString -> GQLResult (Schema VALID) Source #
render :: RenderGQL a => a -> ByteString Source #
validateRequest :: Config -> Schema VALID -> ExecutableDocument -> GQLResult (Operation VALID) Source #