Documentation ¶
Index ¶
- Constants
- type Argument
- type BooleanValue
- type Comment
- type CommentGroup
- type Definition
- type Directive
- type DirectiveDefinition
- type Document
- type EnumDefinition
- type EnumValue
- type EnumValueDefinition
- type Field
- type FieldDefinition
- type FloatValue
- type FragmentDefinition
- type FragmentSpread
- type InlineFragment
- type InputObjectDefinition
- func (def *InputObjectDefinition) GetLoc() Location
- func (def *InputObjectDefinition) GetName() *Name
- func (def *InputObjectDefinition) GetOperation() string
- func (def *InputObjectDefinition) GetSelectionSet() *SelectionSet
- func (def *InputObjectDefinition) GetVariableDefinitions() []*VariableDefinition
- type InputValueDefinition
- type IntValue
- type InterfaceDefinition
- type List
- type ListValue
- type Location
- type Name
- type Named
- type Node
- type NonNull
- type ObjectDefinition
- type ObjectField
- type ObjectValue
- type OperationDefinition
- func (op *OperationDefinition) GetDirectives() []*Directive
- func (op *OperationDefinition) GetLoc() Location
- func (op *OperationDefinition) GetName() *Name
- func (op *OperationDefinition) GetOperation() string
- func (op *OperationDefinition) GetSelectionSet() *SelectionSet
- func (op *OperationDefinition) GetVariableDefinitions() []*VariableDefinition
- type OperationTypeDefinition
- type ScalarDefinition
- type SchemaDefinition
- type Selection
- type SelectionSet
- type StringValue
- type Type
- type TypeDefinition
- type TypeExtensionDefinition
- type TypeSystemDefinition
- type UnionDefinition
- type Value
- type Variable
- type VariableDefinition
Constants ¶
const ( OperationTypeQuery = "query" OperationTypeMutation = "mutation" OperationTypeSubscription = "subscription" )
Note: subscription is an experimental non-spec addition.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooleanValue ¶
BooleanValue implements Node, Value
func (*BooleanValue) GetLoc ¶
func (v *BooleanValue) GetLoc() Location
func (*BooleanValue) GetValue ¶
func (v *BooleanValue) GetValue() any
type CommentGroup ¶
CommentGroup represents a sequence of comments with no other tokens and no empty lines between.
func (*CommentGroup) GetLoc ¶
func (c *CommentGroup) GetLoc() Location
type Definition ¶
type Definition interface { GetOperation() string GetVariableDefinitions() []*VariableDefinition GetSelectionSet() *SelectionSet GetLoc() Location }
type DirectiveDefinition ¶
type DirectiveDefinition struct { Loc Location Name *Name Arguments []*InputValueDefinition Locations []*Name }
DirectiveDefinition implements Node, Definition
func (*DirectiveDefinition) GetLoc ¶
func (def *DirectiveDefinition) GetLoc() Location
func (*DirectiveDefinition) GetOperation ¶
func (def *DirectiveDefinition) GetOperation() string
func (*DirectiveDefinition) GetSelectionSet ¶
func (def *DirectiveDefinition) GetSelectionSet() *SelectionSet
func (*DirectiveDefinition) GetVariableDefinitions ¶
func (def *DirectiveDefinition) GetVariableDefinitions() []*VariableDefinition
type Document ¶
type Document struct { Loc Location Definitions []Node Comments []*CommentGroup }
Document implements Node
type EnumDefinition ¶
type EnumDefinition struct { Loc Location Name *Name Directives []*Directive Values []*EnumValueDefinition Doc *CommentGroup }
EnumDefinition implements Node, Definition
func (*EnumDefinition) GetLoc ¶
func (def *EnumDefinition) GetLoc() Location
func (*EnumDefinition) GetName ¶
func (def *EnumDefinition) GetName() *Name
func (*EnumDefinition) GetOperation ¶
func (def *EnumDefinition) GetOperation() string
func (*EnumDefinition) GetSelectionSet ¶
func (def *EnumDefinition) GetSelectionSet() *SelectionSet
func (*EnumDefinition) GetVariableDefinitions ¶
func (def *EnumDefinition) GetVariableDefinitions() []*VariableDefinition
type EnumValueDefinition ¶
type EnumValueDefinition struct { Loc Location Name *Name Directives []*Directive Doc *CommentGroup Comment *CommentGroup }
EnumValueDefinition implements Node, Definition
func (*EnumValueDefinition) GetLoc ¶
func (def *EnumValueDefinition) GetLoc() Location
type Field ¶
type Field struct { Loc Location Alias *Name Name *Name Arguments []*Argument Directives []*Directive SelectionSet *SelectionSet }
Field implements Node, Selection
func (*Field) GetSelectionSet ¶
func (f *Field) GetSelectionSet() *SelectionSet
type FieldDefinition ¶
type FieldDefinition struct { Loc Location Name *Name Arguments []*InputValueDefinition Type Type Doc *CommentGroup Comment *CommentGroup Directives []*Directive }
FieldDefinition implements Node
func (*FieldDefinition) GetLoc ¶
func (def *FieldDefinition) GetLoc() Location
type FloatValue ¶
FloatValue implements Node, Value
func (*FloatValue) GetLoc ¶
func (v *FloatValue) GetLoc() Location
func (*FloatValue) GetValue ¶
func (v *FloatValue) GetValue() any
type FragmentDefinition ¶
type FragmentDefinition struct { Loc Location Operation string Name *Name VariableDefinitions []*VariableDefinition TypeCondition *Named Directives []*Directive SelectionSet *SelectionSet }
FragmentDefinition implements Node, Definition
func (*FragmentDefinition) GetLoc ¶
func (fd *FragmentDefinition) GetLoc() Location
func (*FragmentDefinition) GetName ¶
func (fd *FragmentDefinition) GetName() *Name
func (*FragmentDefinition) GetOperation ¶
func (fd *FragmentDefinition) GetOperation() string
func (*FragmentDefinition) GetSelectionSet ¶
func (fd *FragmentDefinition) GetSelectionSet() *SelectionSet
func (*FragmentDefinition) GetVariableDefinitions ¶
func (fd *FragmentDefinition) GetVariableDefinitions() []*VariableDefinition
type FragmentSpread ¶
FragmentSpread implements Node, Selection
func (*FragmentSpread) GetLoc ¶
func (fs *FragmentSpread) GetLoc() Location
func (*FragmentSpread) GetSelectionSet ¶
func (fs *FragmentSpread) GetSelectionSet() *SelectionSet
type InlineFragment ¶
type InlineFragment struct { Loc Location TypeCondition *Named Directives []*Directive SelectionSet *SelectionSet }
InlineFragment implements Node, Selection
func (*InlineFragment) GetLoc ¶
func (f *InlineFragment) GetLoc() Location
func (*InlineFragment) GetSelectionSet ¶
func (f *InlineFragment) GetSelectionSet() *SelectionSet
type InputObjectDefinition ¶
type InputObjectDefinition struct { Loc Location Name *Name Directives []*Directive Fields []*InputValueDefinition Doc *CommentGroup }
InputObjectDefinition implements Node, Definition
func (*InputObjectDefinition) GetLoc ¶
func (def *InputObjectDefinition) GetLoc() Location
func (*InputObjectDefinition) GetName ¶
func (def *InputObjectDefinition) GetName() *Name
func (*InputObjectDefinition) GetOperation ¶
func (def *InputObjectDefinition) GetOperation() string
func (*InputObjectDefinition) GetSelectionSet ¶
func (def *InputObjectDefinition) GetSelectionSet() *SelectionSet
func (*InputObjectDefinition) GetVariableDefinitions ¶
func (def *InputObjectDefinition) GetVariableDefinitions() []*VariableDefinition
type InputValueDefinition ¶
type InputValueDefinition struct { Loc Location Name *Name Type Type DefaultValue Value Doc *CommentGroup Comment *CommentGroup Directives []*Directive }
InputValueDefinition implements Node
func (*InputValueDefinition) GetLoc ¶
func (def *InputValueDefinition) GetLoc() Location
func (*InputValueDefinition) String ¶
func (def *InputValueDefinition) String() string
type InterfaceDefinition ¶
type InterfaceDefinition struct { Loc Location Name *Name Fields []*FieldDefinition Directives []*Directive Doc *CommentGroup }
InterfaceDefinition implements Node, Definition
func (*InterfaceDefinition) GetLoc ¶
func (def *InterfaceDefinition) GetLoc() Location
func (*InterfaceDefinition) GetName ¶
func (def *InterfaceDefinition) GetName() *Name
func (*InterfaceDefinition) GetOperation ¶
func (def *InterfaceDefinition) GetOperation() string
func (*InterfaceDefinition) GetSelectionSet ¶
func (def *InterfaceDefinition) GetSelectionSet() *SelectionSet
func (*InterfaceDefinition) GetVariableDefinitions ¶
func (def *InterfaceDefinition) GetVariableDefinitions() []*VariableDefinition
type ListValue ¶
ListValue implements Node, Value
type ObjectDefinition ¶
type ObjectDefinition struct { Loc Location Name *Name Interfaces []*Named Directives []*Directive Fields []*FieldDefinition Doc *CommentGroup }
ObjectDefinition implements Node, Definition
func (*ObjectDefinition) GetLoc ¶
func (def *ObjectDefinition) GetLoc() Location
func (*ObjectDefinition) GetName ¶
func (def *ObjectDefinition) GetName() *Name
func (*ObjectDefinition) GetOperation ¶
func (def *ObjectDefinition) GetOperation() string
func (*ObjectDefinition) GetSelectionSet ¶
func (def *ObjectDefinition) GetSelectionSet() *SelectionSet
func (*ObjectDefinition) GetVariableDefinitions ¶
func (def *ObjectDefinition) GetVariableDefinitions() []*VariableDefinition
type ObjectField ¶
ObjectField implements Node, Value
func (*ObjectField) GetLoc ¶
func (f *ObjectField) GetLoc() Location
func (*ObjectField) GetValue ¶
func (f *ObjectField) GetValue() any
type ObjectValue ¶
type ObjectValue struct { Loc Location Fields []*ObjectField }
ObjectValue implements Node, Value
func (*ObjectValue) GetLoc ¶
func (v *ObjectValue) GetLoc() Location
func (*ObjectValue) GetValue ¶
func (v *ObjectValue) GetValue() any
type OperationDefinition ¶
type OperationDefinition struct { Loc Location Operation string Name *Name VariableDefinitions []*VariableDefinition Directives []*Directive SelectionSet *SelectionSet }
OperationDefinition implements Node, Definition
func (*OperationDefinition) GetDirectives ¶
func (op *OperationDefinition) GetDirectives() []*Directive
func (*OperationDefinition) GetLoc ¶
func (op *OperationDefinition) GetLoc() Location
func (*OperationDefinition) GetName ¶
func (op *OperationDefinition) GetName() *Name
func (*OperationDefinition) GetOperation ¶
func (op *OperationDefinition) GetOperation() string
func (*OperationDefinition) GetSelectionSet ¶
func (op *OperationDefinition) GetSelectionSet() *SelectionSet
func (*OperationDefinition) GetVariableDefinitions ¶
func (op *OperationDefinition) GetVariableDefinitions() []*VariableDefinition
type OperationTypeDefinition ¶
ScalarDefinition implements Node, Definition
func (*OperationTypeDefinition) GetLoc ¶
func (def *OperationTypeDefinition) GetLoc() Location
type ScalarDefinition ¶
ScalarDefinition implements Node, Definition
func (*ScalarDefinition) GetLoc ¶
func (def *ScalarDefinition) GetLoc() Location
func (*ScalarDefinition) GetName ¶
func (def *ScalarDefinition) GetName() *Name
func (*ScalarDefinition) GetOperation ¶
func (def *ScalarDefinition) GetOperation() string
func (*ScalarDefinition) GetSelectionSet ¶
func (def *ScalarDefinition) GetSelectionSet() *SelectionSet
func (*ScalarDefinition) GetVariableDefinitions ¶
func (def *ScalarDefinition) GetVariableDefinitions() []*VariableDefinition
type SchemaDefinition ¶
type SchemaDefinition struct { Loc Location Directives []*Directive OperationTypes []*OperationTypeDefinition }
SchemaDefinition implements Node, Definition
func (*SchemaDefinition) GetLoc ¶
func (def *SchemaDefinition) GetLoc() Location
func (*SchemaDefinition) GetOperation ¶
func (def *SchemaDefinition) GetOperation() string
func (*SchemaDefinition) GetSelectionSet ¶
func (def *SchemaDefinition) GetSelectionSet() *SelectionSet
func (*SchemaDefinition) GetVariableDefinitions ¶
func (def *SchemaDefinition) GetVariableDefinitions() []*VariableDefinition
type Selection ¶
type Selection interface { Node GetSelectionSet() *SelectionSet }
type SelectionSet ¶
SelectionSet implements Node
func (*SelectionSet) GetLoc ¶
func (ss *SelectionSet) GetLoc() Location
type StringValue ¶
StringValue implements Node, Value
func (*StringValue) GetLoc ¶
func (v *StringValue) GetLoc() Location
func (*StringValue) GetValue ¶
func (v *StringValue) GetValue() any
type TypeDefinition ¶
type TypeDefinition interface { GetOperation() string GetVariableDefinitions() []*VariableDefinition GetSelectionSet() *SelectionSet GetLoc() Location }
type TypeExtensionDefinition ¶
type TypeExtensionDefinition struct { Loc Location Definition *ObjectDefinition }
TypeExtensionDefinition implements Node, Definition
func (*TypeExtensionDefinition) GetLoc ¶
func (def *TypeExtensionDefinition) GetLoc() Location
func (*TypeExtensionDefinition) GetOperation ¶
func (def *TypeExtensionDefinition) GetOperation() string
func (*TypeExtensionDefinition) GetSelectionSet ¶
func (def *TypeExtensionDefinition) GetSelectionSet() *SelectionSet
func (*TypeExtensionDefinition) GetVariableDefinitions ¶
func (def *TypeExtensionDefinition) GetVariableDefinitions() []*VariableDefinition
type TypeSystemDefinition ¶
type TypeSystemDefinition interface { GetOperation() string GetVariableDefinitions() []*VariableDefinition GetSelectionSet() *SelectionSet GetLoc() Location }
type UnionDefinition ¶
type UnionDefinition struct { Loc Location Name *Name Directives []*Directive Types []*Named Doc *CommentGroup Comment *CommentGroup }
UnionDefinition implements Node, Definition
func (*UnionDefinition) GetLoc ¶
func (def *UnionDefinition) GetLoc() Location
func (*UnionDefinition) GetName ¶
func (def *UnionDefinition) GetName() *Name
func (*UnionDefinition) GetOperation ¶
func (def *UnionDefinition) GetOperation() string
func (*UnionDefinition) GetSelectionSet ¶
func (def *UnionDefinition) GetSelectionSet() *SelectionSet
func (*UnionDefinition) GetVariableDefinitions ¶
func (def *UnionDefinition) GetVariableDefinitions() []*VariableDefinition
type VariableDefinition ¶
VariableDefinition implements Node
func (*VariableDefinition) GetLoc ¶
func (vd *VariableDefinition) GetLoc() Location