Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action = byte
Action defines an action that should be taken based when parsing the schema
const ( ActionEnd Action = 'e' ActionOperator Action = 'o' ActionOperatorArgs Action = 'A' ActionOperatorArg Action = 'a' ActionField Action = 'f' ActionSpread Action = 's' ActionFragment Action = 'F' ActionValue Action = 'v' ActionObjectValueField Action = 'u' ActionDirective Action = 'd' )
All possible actions
type ErrorWLocation ¶
ErrorWLocation is an error with a location in a file
func (ErrorWLocation) Error ¶
func (e ErrorWLocation) Error() string
Error implements the error interface
type OperatorKind ¶
type OperatorKind = byte
OperatorKind defines the kind of operation
const ( OperatorQuery OperatorKind = 'q' OperatorMutation OperatorKind = 'm' OperatorSubscription OperatorKind = 's' )
All possible operators
type ParserCtx ¶
type ParserCtx struct { Res []byte FragmentLocations []int Query []byte Errors []error TargetIdx int // -1 = no matching target was found, >= 0 = res index of target Hasher hash.Hash32 CacheableQueryMinLen int // Default = 300 // contains filtered or unexported fields }
ParserCtx has all the information needed to parse a query
func (*ParserCtx) ParseQueryToBytecode ¶
ParseQueryToBytecode parses (*ParserCtx).Query into (*ParserCtx).Res target is a optional string that can be set to define a operator target
Click to show internal directories.
Click to hide internal directories.