Documentation
¶
Overview ¶
Package gql is responsible for lexing and parsing a GraphQL query/mutation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterTree ¶ added in v0.7.0
type FilterTree struct {
Op string
Child []*FilterTree
Func *Function
}
FilterTree is the result of parsing the filter directive. Either you can have `Op and Children` on non-leaf nodes Or Func at leaf nodes.
type Function ¶ added in v0.7.0
type Function struct {
Attr string
Name string // Specifies the name of the function.
Args []string // Contains the arguments of the function.
NeedsVar []string // If the function requires some variable
}
Function holds the information about gql functions.
func (*Function) IsAggregator ¶ added in v0.7.3
func (*Function) IsPasswordVerifier ¶ added in v0.7.3
type GraphQuery ¶
type GraphQuery struct {
UID []uint64
Attr string
Langs []string
Alias string
IsCount bool
Var string
NeedsVar []string
Func *Function
Args map[string]string
Children []*GraphQuery
Filter *FilterTree
Normalize bool
Facets *Facets
FacetsFilter *FilterTree
// contains filtered or unexported fields
}
GraphQuery stores the parsed Query in a tree format. This gets converted to internally used query.SubGraph before processing the query.
func (*GraphQuery) DebugPrint ¶ added in v0.7.0
func (gq *GraphQuery) DebugPrint(prefix string)
DebugPrint is useful for debugging.
type Result ¶ added in v0.7.2
type Result struct {
Query []*GraphQuery
QueryVars []*Vars
Mutation *Mutation
}
Result struct contains the Query list, its corresponding variable use list and the mutation block.
Click to show internal directories.
Click to hide internal directories.