Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Definitions used by the validation rules and the validator itself.
Synopsis
- data Error = Error {}
- data Rule m
- = DefinitionRule (Definition -> RuleT m)
- | OperationDefinitionRule (OperationDefinition -> RuleT m)
- | FragmentDefinitionRule (FragmentDefinition -> RuleT m)
- | SelectionRule (Maybe (Type m) -> Selection -> RuleT m)
- | FragmentRule (FragmentDefinition -> RuleT m) (InlineFragment -> RuleT m)
- | FragmentSpreadRule (FragmentSpread -> RuleT m)
- | FieldRule (Maybe (Type m) -> Field -> RuleT m)
- | ArgumentsRule (Maybe (Type m) -> Field -> RuleT m) (Directive -> RuleT m)
- | DirectivesRule (DirectiveLocation -> [Directive] -> RuleT m)
- | VariablesRule ([VariableDefinition] -> RuleT m)
- | ValueRule (Maybe Type -> Node Value -> RuleT m) (Maybe Type -> Node ConstValue -> RuleT m)
- type RuleT m = ReaderT (Validation m) Seq Error
- data Validation m = Validation {}
Documentation
Validation error.
Instances
Rule
assigns a function to each AST node that can be validated. If the
validation fails, the function should return an error message, or Nothing
otherwise.
DefinitionRule (Definition -> RuleT m) | |
OperationDefinitionRule (OperationDefinition -> RuleT m) | |
FragmentDefinitionRule (FragmentDefinition -> RuleT m) | |
SelectionRule (Maybe (Type m) -> Selection -> RuleT m) | |
FragmentRule (FragmentDefinition -> RuleT m) (InlineFragment -> RuleT m) | |
FragmentSpreadRule (FragmentSpread -> RuleT m) | |
FieldRule (Maybe (Type m) -> Field -> RuleT m) | |
ArgumentsRule (Maybe (Type m) -> Field -> RuleT m) (Directive -> RuleT m) | |
DirectivesRule (DirectiveLocation -> [Directive] -> RuleT m) | |
VariablesRule ([VariableDefinition] -> RuleT m) | |
ValueRule (Maybe Type -> Node Value -> RuleT m) (Maybe Type -> Node ConstValue -> RuleT m) |