Documentation
¶
Index ¶
- type Lexer
- type ManualAstMod
- func (m *ManualAstMod) AppendFieldToSelectionSet(fieldRef, setRef int)
- func (m *ManualAstMod) DeleteFieldFromSelectionSet(fieldRef, setRef int)
- func (m *ManualAstMod) MergeArgIntoFieldArguments(argRef, fieldRef int)
- func (m *ManualAstMod) PutArgument(argument document.Argument) int
- func (m *ManualAstMod) PutArgumentSet(set document.ArgumentSet) int
- func (m *ManualAstMod) PutField(field document.Field) int
- func (m *ManualAstMod) PutLiteralBytes(literal []byte) (nameRef int, byteSliceRef document.ByteSliceReference, err error)
- func (m *ManualAstMod) PutLiteralString(literal string) (nameRef int, byteSliceRef document.ByteSliceReference, err error)
- func (m *ManualAstMod) PutValue(value document.Value) int
- func (m *ManualAstMod) SetMutationTypeName(name int)
- func (m *ManualAstMod) SetQueryTypeName(name int)
- func (m *ManualAstMod) SetSubscriptionTypeName(name int)
- type Option
- type Options
- type ParsedDefinitions
- type Parser
- func (p *Parser) ByteSlice(reference document.ByteSliceReference) document.ByteSlice
- func (p *Parser) CachedByteSlice(i int) document.ByteSlice
- func (p *Parser) InitDirectiveSet(set *document.DirectiveSet)
- func (p *Parser) ParseExecutableDefinition(input []byte) (err error)
- func (p *Parser) ParseIntrospectionResponse(response *introspection.Response) (err error)
- func (p *Parser) ParseTypeSystemDefinition(input []byte) (err error)
- func (p *Parser) TextPosition() position.Position
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer interface {
SetTypeSystemInput(input []byte) error
ResetTypeSystemInput()
SetExecutableInput(input []byte) error
AppendBytes(input []byte) (err error)
Read() (tok token.Token)
Peek(ignoreWhitespace bool) keyword.Keyword
ByteSlice(reference document.ByteSliceReference) document.ByteSlice
TextPosition() position.Position
}
Lexer is the interface used by the Parser to lex tokens
type ManualAstMod ¶ added in v1.2.0
type ManualAstMod struct {
// contains filtered or unexported fields
}
ManualAstMod keeps functions to manually modify the parsed ast
func NewManualAstMod ¶ added in v1.2.0
func NewManualAstMod(p *Parser) *ManualAstMod
func (*ManualAstMod) AppendFieldToSelectionSet ¶ added in v1.2.0
func (m *ManualAstMod) AppendFieldToSelectionSet(fieldRef, setRef int)
func (*ManualAstMod) DeleteFieldFromSelectionSet ¶ added in v1.2.0
func (m *ManualAstMod) DeleteFieldFromSelectionSet(fieldRef, setRef int)
func (*ManualAstMod) MergeArgIntoFieldArguments ¶ added in v1.3.0
func (m *ManualAstMod) MergeArgIntoFieldArguments(argRef, fieldRef int)
func (*ManualAstMod) PutArgument ¶ added in v1.3.0
func (m *ManualAstMod) PutArgument(argument document.Argument) int
func (*ManualAstMod) PutArgumentSet ¶ added in v1.3.0
func (m *ManualAstMod) PutArgumentSet(set document.ArgumentSet) int
func (*ManualAstMod) PutField ¶ added in v1.2.0
func (m *ManualAstMod) PutField(field document.Field) int
func (*ManualAstMod) PutLiteralBytes ¶ added in v1.3.0
func (m *ManualAstMod) PutLiteralBytes(literal []byte) (nameRef int, byteSliceRef document.ByteSliceReference, err error)
func (*ManualAstMod) PutLiteralString ¶ added in v1.3.0
func (m *ManualAstMod) PutLiteralString(literal string) (nameRef int, byteSliceRef document.ByteSliceReference, err error)
func (*ManualAstMod) PutValue ¶ added in v1.3.0
func (m *ManualAstMod) PutValue(value document.Value) int
func (*ManualAstMod) SetMutationTypeName ¶ added in v1.3.0
func (m *ManualAstMod) SetMutationTypeName(name int)
func (*ManualAstMod) SetQueryTypeName ¶ added in v1.3.0
func (m *ManualAstMod) SetQueryTypeName(name int)
func (*ManualAstMod) SetSubscriptionTypeName ¶ added in v1.3.0
func (m *ManualAstMod) SetSubscriptionTypeName(name int)
type ParsedDefinitions ¶
type ParsedDefinitions struct {
TypeSystemDefinition document.TypeSystemDefinition
ExecutableDefinition document.ExecutableDefinition
OperationDefinitions document.OperationDefinitions
FragmentDefinitions document.FragmentDefinitions
VariableDefinitions document.VariableDefinitions
Fields document.Fields
InlineFragments document.InlineFragments
FragmentSpreads document.FragmentSpreads
Arguments document.Arguments
ArgumentSets []document.ArgumentSet
Directives document.Directives
DirectiveSets []document.DirectiveSet
EnumTypeDefinitions document.EnumTypeDefinitions
ArgumentsDefinitions document.ArgumentsDefinitions
EnumValuesDefinitions document.EnumValueDefinitions
FieldDefinitions document.FieldDefinitions
InputValueDefinitions document.InputValueDefinitions
InputObjectTypeDefinitions document.InputObjectTypeDefinitions
DirectiveDefinitions document.DirectiveDefinitions
InterfaceTypeDefinitions document.InterfaceTypeDefinitions
ObjectTypeDefinitions document.ObjectTypeDefinitions
ScalarTypeDefinitions document.ScalarTypeDefinitions
UnionTypeDefinitions document.UnionTypeDefinitions
InputFieldsDefinitions document.InputFieldsDefinitions
Values []document.Value
ListValues []document.ListValue
ObjectValues []document.ObjectValue
ObjectFields document.ObjectFields
Types document.Types
SelectionSets []document.SelectionSet
ByteSliceReferences []document.ByteSliceReference
Integers []int32
Floats []float32
Booleans [2]bool
}
ParsedDefinitions contains all parsed definitions to avoid deeply nested data structures while parsing
type Parser ¶
type Parser struct {
ParsedDefinitions ParsedDefinitions
// contains filtered or unexported fields
}
Parser holds the lexer and a buffer for writing literals
func (*Parser) ByteSlice ¶
func (p *Parser) ByteSlice(reference document.ByteSliceReference) document.ByteSlice
func (*Parser) InitDirectiveSet ¶
func (p *Parser) InitDirectiveSet(set *document.DirectiveSet)
func (*Parser) ParseExecutableDefinition ¶
ParseExecutableDefinition parses an ExecutableDefinition from an io.Reader
func (*Parser) ParseIntrospectionResponse ¶ added in v1.3.0
func (p *Parser) ParseIntrospectionResponse(response *introspection.Response) (err error)
func (*Parser) ParseTypeSystemDefinition ¶
ParseTypeSystemDefinition parses a TypeSystemDefinition from an io.Reader
func (*Parser) TextPosition ¶
Source Files
¶
- arguments_parser.go
- argumentsdefinition_parser.go
- bool_value_parser.go
- byteslice_parser.go
- defaultvalue_parser.go
- directivedefinition_parser.go
- directives_parser.go
- enumtypedefinition_parser.go
- enumvaluesdefinition_parser.go
- executabledefinition_parser.go
- field_parser.go
- fieldsdefinition_parser.go
- float_value_parser.go
- fragmentdefinition_parser.go
- fragmentspread_parser.go
- implementsinterfaces_parser.go
- inlinefragment_parser.go
- inputfieldsdefinition_parser.go
- inputobjecttypedefinition_parser.go
- inputvaluedefinitions_parser.go
- int_value_parser.go
- interfacetypedefinition_parser.go
- list_value_parser.go
- manual_ast_mod.go
- object_value_parser.go
- objecttypedefinition_parser.go
- operationdefinition_parser.go
- parser.go
- parser_introspection.go
- scalartypedefinition_parser.go
- schemadefinition_parser.go
- selectionset_parser.go
- type_parser.go
- typesystemdefinition_parser.go
- uniontypedefinition_parser.go
- value_parser.go
- variabledefinitions_parser.go
Click to show internal directories.
Click to hide internal directories.