| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
Language.GraphQL.AST
Description
This module defines an abstract syntax tree for the GraphQL language based on
Facebook's GraphQL Specification.
Target AST for Parser.
Synopsis
- type Alias = Name
- data Argument = Argument Name Value
- type Arguments = [Argument]
- data Definition
- data Directive = Directive Name [Argument]
- type Directives = [Directive]
- type Document = NonEmpty Definition
- data Field = Field (Maybe Alias) Name Arguments Directives SelectionSetOpt
- data FragmentDefinition = FragmentDefinition FragmentName TypeCondition Directives SelectionSet
- type FragmentName = Name
- data FragmentSpread = FragmentSpread Name Directives
- data InlineFragment = InlineFragment (Maybe TypeCondition) Directives SelectionSet
- type Name = Text
- data NonNullType
- data ObjectField = ObjectField Name Value
- data OperationDefinition
- data OperationType
- data Selection
- type SelectionSet = NonEmpty Selection
- type SelectionSetOpt = [Selection]
- data Type
- type TypeCondition = Name
- data Value
- data VariableDefinition = VariableDefinition Name Type (Maybe Value)
- type VariableDefinitions = [VariableDefinition]
Documentation
data Definition Source #
Instances
| Eq Definition Source # | |
Defined in Language.GraphQL.AST | |
| Show Definition Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> Definition -> ShowS # show :: Definition -> String # showList :: [Definition] -> ShowS # | |
type Directives = [Directive] Source #
type Document = NonEmpty Definition Source #
Constructors
| Field (Maybe Alias) Name Arguments Directives SelectionSetOpt |
data FragmentDefinition Source #
Instances
| Eq FragmentDefinition Source # | |
Defined in Language.GraphQL.AST Methods (==) :: FragmentDefinition -> FragmentDefinition -> Bool # (/=) :: FragmentDefinition -> FragmentDefinition -> Bool # | |
| Show FragmentDefinition Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> FragmentDefinition -> ShowS # show :: FragmentDefinition -> String # showList :: [FragmentDefinition] -> ShowS # | |
type FragmentName = Name Source #
data FragmentSpread Source #
Constructors
| FragmentSpread Name Directives |
Instances
| Eq FragmentSpread Source # | |
Defined in Language.GraphQL.AST Methods (==) :: FragmentSpread -> FragmentSpread -> Bool # (/=) :: FragmentSpread -> FragmentSpread -> Bool # | |
| Show FragmentSpread Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> FragmentSpread -> ShowS # show :: FragmentSpread -> String # showList :: [FragmentSpread] -> ShowS # | |
data InlineFragment Source #
Constructors
| InlineFragment (Maybe TypeCondition) Directives SelectionSet |
Instances
| Eq InlineFragment Source # | |
Defined in Language.GraphQL.AST Methods (==) :: InlineFragment -> InlineFragment -> Bool # (/=) :: InlineFragment -> InlineFragment -> Bool # | |
| Show InlineFragment Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> InlineFragment -> ShowS # show :: InlineFragment -> String # showList :: [InlineFragment] -> ShowS # | |
data NonNullType Source #
Constructors
| NonNullTypeNamed Name | |
| NonNullTypeList Type |
Instances
| Eq NonNullType Source # | |
Defined in Language.GraphQL.AST | |
| Show NonNullType Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> NonNullType -> ShowS # show :: NonNullType -> String # showList :: [NonNullType] -> ShowS # | |
data ObjectField Source #
Constructors
| ObjectField Name Value |
Instances
| Eq ObjectField Source # | |
Defined in Language.GraphQL.AST | |
| Show ObjectField Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> ObjectField -> ShowS # show :: ObjectField -> String # showList :: [ObjectField] -> ShowS # | |
data OperationDefinition Source #
Constructors
| OperationSelectionSet SelectionSet | |
| OperationDefinition OperationType (Maybe Name) VariableDefinitions Directives SelectionSet |
Instances
| Eq OperationDefinition Source # | |
Defined in Language.GraphQL.AST Methods (==) :: OperationDefinition -> OperationDefinition -> Bool # (/=) :: OperationDefinition -> OperationDefinition -> Bool # | |
| Show OperationDefinition Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> OperationDefinition -> ShowS # show :: OperationDefinition -> String # showList :: [OperationDefinition] -> ShowS # | |
data OperationType Source #
Instances
| Eq OperationType Source # | |
Defined in Language.GraphQL.AST Methods (==) :: OperationType -> OperationType -> Bool # (/=) :: OperationType -> OperationType -> Bool # | |
| Show OperationType Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> OperationType -> ShowS # show :: OperationType -> String # showList :: [OperationType] -> ShowS # | |
Constructors
| SelectionField Field | |
| SelectionFragmentSpread FragmentSpread | |
| SelectionInlineFragment InlineFragment |
type SelectionSet = NonEmpty Selection Source #
type SelectionSetOpt = [Selection] Source #
Constructors
| TypeNamed Name | |
| TypeList Type | |
| TypeNonNull NonNullType |
type TypeCondition = Name Source #
data VariableDefinition Source #
Constructors
| VariableDefinition Name Type (Maybe Value) |
Instances
| Eq VariableDefinition Source # | |
Defined in Language.GraphQL.AST Methods (==) :: VariableDefinition -> VariableDefinition -> Bool # (/=) :: VariableDefinition -> VariableDefinition -> Bool # | |
| Show VariableDefinition Source # | |
Defined in Language.GraphQL.AST Methods showsPrec :: Int -> VariableDefinition -> ShowS # show :: VariableDefinition -> String # showList :: [VariableDefinition] -> ShowS # | |
type VariableDefinitions = [VariableDefinition] Source #