mochi/ast
Types
pub type Document {
Document(definitions: List(Definition))
}
Constructors
-
Document(definitions: List(Definition))
pub type Field {
Field(
alias: option.Option(String),
name: String,
arguments: List(Argument),
directives: List(Directive),
selection_set: option.Option(SelectionSet),
location: option.Option(lexer.Position),
)
}
Constructors
-
Field( alias: option.Option(String), name: String, arguments: List(Argument), directives: List(Directive), selection_set: option.Option(SelectionSet), location: option.Option(lexer.Position), )Arguments
- location
-
Source location of this field in the query document
pub type Fragment {
Fragment(
name: String,
type_condition: String,
directives: List(Directive),
selection_set: SelectionSet,
)
}
Constructors
-
Fragment( name: String, type_condition: String, directives: List(Directive), selection_set: SelectionSet, )
pub type InlineFragmentValue {
InlineFragmentValue(
type_condition: option.Option(String),
directives: List(Directive),
selection_set: SelectionSet,
)
}
Constructors
-
InlineFragmentValue( type_condition: option.Option(String), directives: List(Directive), selection_set: SelectionSet, )
pub type Operation {
Operation(
operation_type: OperationType,
name: option.Option(String),
variable_definitions: List(VariableDefinition),
directives: List(Directive),
selection_set: SelectionSet,
)
ShorthandQuery(selection_set: SelectionSet)
}
Constructors
-
Operation( operation_type: OperationType, name: option.Option(String), variable_definitions: List(VariableDefinition), directives: List(Directive), selection_set: SelectionSet, ) -
ShorthandQuery(selection_set: SelectionSet)
pub type OperationType {
Query
Mutation
Subscription
}
Constructors
-
Query -
Mutation -
Subscription
pub type Selection {
FieldSelection(field: Field)
FragmentSpread(fragment_spread: FragmentSpreadValue)
InlineFragment(inline_fragment: InlineFragmentValue)
}
Constructors
-
FieldSelection(field: Field) -
FragmentSpread(fragment_spread: FragmentSpreadValue) -
InlineFragment(inline_fragment: InlineFragmentValue)
pub type Value {
IntValue(value: Int)
FloatValue(value: Float)
StringValue(value: String)
BooleanValue(value: Bool)
NullValue
EnumValue(value: String)
ListValue(values: List(Value))
ObjectValue(fields: List(ObjectField))
VariableValue(name: String)
}
Constructors
-
IntValue(value: Int) -
FloatValue(value: Float) -
StringValue(value: String) -
BooleanValue(value: Bool) -
NullValue -
EnumValue(value: String) -
ListValue(values: List(Value)) -
ObjectValue(fields: List(ObjectField)) -
VariableValue(name: String)
pub type VariableDefinition {
VariableDefinition(
variable: String,
type_: Type,
default_value: option.Option(Value),
directives: List(Directive),
)
}
Constructors
-
VariableDefinition( variable: String, type_: Type, default_value: option.Option(Value), directives: List(Directive), )