Versions in this module Expand all Collapse all v3 v3.1.1 Nov 24, 2022 Changes in this version + func Parse(src []byte) (operation *Operation, variables map[string]*VariableDeclaration, ...) + func WriteYAML(w io.Writer, o *Operation) error + type Argument struct + AssociatedVariable *VariableDeclaration + Constraint Expression + Def *ast.ArgumentDefinition + Parent Expression + func (a *Argument) MarshalYAML() (any, error) + func (e *Argument) GetLocation() LocRange + func (e *Argument) GetParent() Expression + func (e *Argument) IsFloat() bool + func (e *Argument) TypeDesignation() string + type ArgumentList struct + Arguments []*Argument + func (l ArgumentList) MarshalYAML() (any, error) + type Array struct + Items []Expression + Parent Expression + Type *ast.Type + func (a *Array) MarshalYAML() (any, error) + func (e *Array) GetLocation() LocRange + func (e *Array) GetParent() Expression + func (e *Array) IsFloat() bool + func (e *Array) TypeDesignation() string + type ConstrAny struct + Parent Expression + func (c *ConstrAny) MarshalYAML() (any, error) + func (e *ConstrAny) GetLocation() LocRange + func (e *ConstrAny) GetParent() Expression + func (e *ConstrAny) IsFloat() bool + func (e *ConstrAny) TypeDesignation() string + type ConstrEquals struct + Parent Expression + Value Expression + func (c *ConstrEquals) MarshalYAML() (any, error) + func (e *ConstrEquals) GetLocation() LocRange + func (e *ConstrEquals) GetParent() Expression + func (e *ConstrEquals) IsFloat() bool + func (e *ConstrEquals) TypeDesignation() string + type ConstrGreater struct + Parent Expression + Value Expression + func (c *ConstrGreater) MarshalYAML() (any, error) + func (e *ConstrGreater) GetLocation() LocRange + func (e *ConstrGreater) GetParent() Expression + func (e *ConstrGreater) IsFloat() bool + func (e *ConstrGreater) TypeDesignation() string + type ConstrGreaterOrEqual struct + Parent Expression + Value Expression + func (c *ConstrGreaterOrEqual) MarshalYAML() (any, error) + func (e *ConstrGreaterOrEqual) GetLocation() LocRange + func (e *ConstrGreaterOrEqual) GetParent() Expression + func (e *ConstrGreaterOrEqual) IsFloat() bool + func (e *ConstrGreaterOrEqual) TypeDesignation() string + type ConstrLenEquals struct + Parent Expression + Value Expression + func (c *ConstrLenEquals) MarshalYAML() (any, error) + func (e *ConstrLenEquals) GetLocation() LocRange + func (e *ConstrLenEquals) GetParent() Expression + func (e *ConstrLenEquals) IsFloat() bool + func (e *ConstrLenEquals) TypeDesignation() string + type ConstrLenGreater struct + Parent Expression + Value Expression + func (c *ConstrLenGreater) MarshalYAML() (any, error) + func (e *ConstrLenGreater) GetLocation() LocRange + func (e *ConstrLenGreater) GetParent() Expression + func (e *ConstrLenGreater) IsFloat() bool + func (e *ConstrLenGreater) TypeDesignation() string + type ConstrLenGreaterOrEqual struct + Parent Expression + Value Expression + func (c *ConstrLenGreaterOrEqual) MarshalYAML() (any, error) + func (e *ConstrLenGreaterOrEqual) GetLocation() LocRange + func (e *ConstrLenGreaterOrEqual) GetParent() Expression + func (e *ConstrLenGreaterOrEqual) IsFloat() bool + func (e *ConstrLenGreaterOrEqual) TypeDesignation() string + type ConstrLenLess struct + Parent Expression + Value Expression + func (c *ConstrLenLess) MarshalYAML() (any, error) + func (e *ConstrLenLess) GetLocation() LocRange + func (e *ConstrLenLess) GetParent() Expression + func (e *ConstrLenLess) IsFloat() bool + func (e *ConstrLenLess) TypeDesignation() string + type ConstrLenLessOrEqual struct + Parent Expression + Value Expression + func (c *ConstrLenLessOrEqual) MarshalYAML() (any, error) + func (e *ConstrLenLessOrEqual) GetLocation() LocRange + func (e *ConstrLenLessOrEqual) GetParent() Expression + func (e *ConstrLenLessOrEqual) IsFloat() bool + func (e *ConstrLenLessOrEqual) TypeDesignation() string + type ConstrLenNotEquals struct + Parent Expression + Value Expression + func (c *ConstrLenNotEquals) MarshalYAML() (any, error) + func (e *ConstrLenNotEquals) GetLocation() LocRange + func (e *ConstrLenNotEquals) GetParent() Expression + func (e *ConstrLenNotEquals) IsFloat() bool + func (e *ConstrLenNotEquals) TypeDesignation() string + type ConstrLess struct + Parent Expression + Value Expression + func (c *ConstrLess) MarshalYAML() (any, error) + func (e *ConstrLess) GetLocation() LocRange + func (e *ConstrLess) GetParent() Expression + func (e *ConstrLess) IsFloat() bool + func (e *ConstrLess) TypeDesignation() string + type ConstrLessOrEqual struct + Parent Expression + Value Expression + func (c *ConstrLessOrEqual) MarshalYAML() (any, error) + func (e *ConstrLessOrEqual) GetLocation() LocRange + func (e *ConstrLessOrEqual) GetParent() Expression + func (e *ConstrLessOrEqual) IsFloat() bool + func (e *ConstrLessOrEqual) TypeDesignation() string + type ConstrMap struct + Constraint Expression + Parent Expression + func (c *ConstrMap) MarshalYAML() (any, error) + func (e *ConstrMap) GetLocation() LocRange + func (e *ConstrMap) GetParent() Expression + func (e *ConstrMap) IsFloat() bool + func (e *ConstrMap) TypeDesignation() string + type ConstrNotEquals struct + Parent Expression + Value Expression + func (c *ConstrNotEquals) MarshalYAML() (any, error) + func (e *ConstrNotEquals) GetLocation() LocRange + func (e *ConstrNotEquals) GetParent() Expression + func (e *ConstrNotEquals) IsFloat() bool + func (e *ConstrNotEquals) TypeDesignation() string + type Enum struct + Parent Expression + TypeDef *ast.Definition + Value string + func (e *Enum) GetLocation() LocRange + func (e *Enum) GetParent() Expression + func (e *Enum) IsFloat() bool + func (e *Enum) MarshalYAML() (any, error) + func (e *Enum) TypeDesignation() string + type Error struct + Msg string + func (e Error) Error() string + func (e Error) IsErr() bool + type ExprAddition struct + AddendLeft Expression + AddendRight Expression + Float bool + Parent Expression + func (e *ExprAddition) GetLocation() LocRange + func (e *ExprAddition) GetParent() Expression + func (e *ExprAddition) IsFloat() bool + func (e *ExprAddition) MarshalYAML() (any, error) + func (e *ExprAddition) TypeDesignation() string + type ExprDivision struct + Dividend Expression + Divisor Expression + Float bool + Parent Expression + func (e *ExprDivision) GetLocation() LocRange + func (e *ExprDivision) GetParent() Expression + func (e *ExprDivision) IsFloat() bool + func (e *ExprDivision) MarshalYAML() (any, error) + func (e *ExprDivision) TypeDesignation() string + type ExprEqual struct + Left Expression + Parent Expression + Right Expression + func (e *ExprEqual) GetLocation() LocRange + func (e *ExprEqual) GetParent() Expression + func (e *ExprEqual) IsFloat() bool + func (e *ExprEqual) MarshalYAML() (any, error) + func (e *ExprEqual) TypeDesignation() string + type ExprGreater struct + Left Expression + Parent Expression + Right Expression + func (e *ExprGreater) GetLocation() LocRange + func (e *ExprGreater) GetParent() Expression + func (e *ExprGreater) IsFloat() bool + func (e *ExprGreater) MarshalYAML() (any, error) + func (e *ExprGreater) TypeDesignation() string + type ExprGreaterOrEqual struct + Left Expression + Parent Expression + Right Expression + func (e *ExprGreaterOrEqual) GetLocation() LocRange + func (e *ExprGreaterOrEqual) GetParent() Expression + func (e *ExprGreaterOrEqual) IsFloat() bool + func (e *ExprGreaterOrEqual) MarshalYAML() (any, error) + func (e *ExprGreaterOrEqual) TypeDesignation() string + type ExprLess struct + Left Expression + Parent Expression + Right Expression + func (e *ExprLess) GetLocation() LocRange + func (e *ExprLess) GetParent() Expression + func (e *ExprLess) IsFloat() bool + func (e *ExprLess) MarshalYAML() (any, error) + func (e *ExprLess) TypeDesignation() string + type ExprLessOrEqual struct + Left Expression + Parent Expression + Right Expression + func (e *ExprLessOrEqual) GetLocation() LocRange + func (e *ExprLessOrEqual) GetParent() Expression + func (e *ExprLessOrEqual) IsFloat() bool + func (e *ExprLessOrEqual) MarshalYAML() (any, error) + func (e *ExprLessOrEqual) TypeDesignation() string + type ExprLogicalAnd struct + Expressions []Expression + Parent Expression + func (e *ExprLogicalAnd) GetLocation() LocRange + func (e *ExprLogicalAnd) GetParent() Expression + func (e *ExprLogicalAnd) IsFloat() bool + func (e *ExprLogicalAnd) MarshalYAML() (any, error) + func (e *ExprLogicalAnd) TypeDesignation() string + type ExprLogicalNegation struct + Expression Expression + Parent Expression + func (e *ExprLogicalNegation) GetLocation() LocRange + func (e *ExprLogicalNegation) GetParent() Expression + func (e *ExprLogicalNegation) IsFloat() bool + func (e *ExprLogicalNegation) MarshalYAML() (any, error) + func (e *ExprLogicalNegation) TypeDesignation() string + type ExprLogicalOr struct + Expressions []Expression + Parent Expression + func (e *ExprLogicalOr) GetLocation() LocRange + func (e *ExprLogicalOr) GetParent() Expression + func (e *ExprLogicalOr) IsFloat() bool + func (e *ExprLogicalOr) MarshalYAML() (any, error) + func (e *ExprLogicalOr) TypeDesignation() string + type ExprModulo struct + Dividend Expression + Divisor Expression + Float bool + Parent Expression + func (e *ExprModulo) GetLocation() LocRange + func (e *ExprModulo) GetParent() Expression + func (e *ExprModulo) IsFloat() bool + func (e *ExprModulo) MarshalYAML() (any, error) + func (e *ExprModulo) TypeDesignation() string + type ExprMultiplication struct + Float bool + Multiplicant Expression + Multiplicator Expression + Parent Expression + func (e *ExprMultiplication) GetLocation() LocRange + func (e *ExprMultiplication) GetParent() Expression + func (e *ExprMultiplication) IsFloat() bool + func (e *ExprMultiplication) MarshalYAML() (any, error) + func (e *ExprMultiplication) TypeDesignation() string + type ExprNotEqual struct + Left Expression + Parent Expression + Right Expression + func (e *ExprNotEqual) GetLocation() LocRange + func (e *ExprNotEqual) GetParent() Expression + func (e *ExprNotEqual) IsFloat() bool + func (e *ExprNotEqual) MarshalYAML() (any, error) + func (e *ExprNotEqual) TypeDesignation() string + type ExprNumericNegation struct + Expression Expression + Float bool + Parent Expression + func (e *ExprNumericNegation) GetLocation() LocRange + func (e *ExprNumericNegation) GetParent() Expression + func (e *ExprNumericNegation) IsFloat() bool + func (e *ExprNumericNegation) MarshalYAML() (any, error) + func (e *ExprNumericNegation) TypeDesignation() string + type ExprParentheses struct + Expression Expression + Parent Expression + func (e *ExprParentheses) GetLocation() LocRange + func (e *ExprParentheses) GetParent() Expression + func (e *ExprParentheses) IsFloat() bool + func (e *ExprParentheses) MarshalYAML() (any, error) + func (e *ExprParentheses) TypeDesignation() string + type ExprSubtraction struct + Float bool + Minuend Expression + Parent Expression + Subtrahend Expression + func (e *ExprSubtraction) GetLocation() LocRange + func (e *ExprSubtraction) GetParent() Expression + func (e *ExprSubtraction) IsFloat() bool + func (e *ExprSubtraction) MarshalYAML() (any, error) + func (e *ExprSubtraction) TypeDesignation() string + type Expression interface + GetLocation func() LocRange + GetParent func() Expression + IsFloat func() bool + TypeDesignation func() string + func Optimize(e Expression) Expression + type False struct + Parent Expression + TypeDef *ast.Definition + func (e *False) GetLocation() LocRange + func (e *False) GetParent() Expression + func (e *False) IsFloat() bool + func (e *False) MarshalYAML() (any, error) + func (e *False) TypeDesignation() string + type Float struct + Parent Expression + TypeDef *ast.Definition + Value float64 + func (e *Float) GetLocation() LocRange + func (e *Float) GetParent() Expression + func (e *Float) IsFloat() bool + func (e *Float) TypeDesignation() string + func (f *Float) MarshalYAML() (any, error) + type Int struct + Parent Expression + TypeDef *ast.Definition + Value int64 + func (e *Int) GetLocation() LocRange + func (e *Int) GetParent() Expression + func (e *Int) IsFloat() bool + func (e *Int) TypeDesignation() string + func (i *Int) MarshalYAML() (any, error) + type LocRange struct + func (s LocRange) MarshalYAML() (any, error) + type Location struct + Column int + Index int + Line int + type LocationEnd struct + ColumnEnd int + IndexEnd int + LineEnd int + type Name struct + Name string + func (n Name) MarshalYAML() (any, error) + type Null struct + Parent Expression + Type *ast.Type + func (e *Null) GetLocation() LocRange + func (e *Null) GetParent() Expression + func (e *Null) IsFloat() bool + func (e *Null) TypeDesignation() string + func (n *Null) MarshalYAML() (any, error) + type Object struct + Fields []*ObjectField + Parent Expression + TypeDef *ast.Definition + func (e *Object) GetLocation() LocRange + func (e *Object) GetParent() Expression + func (e *Object) IsFloat() bool + func (e *Object) TypeDesignation() string + func (o *Object) MarshalYAML() (any, error) + type ObjectField struct + AssociatedVariable *VariableDeclaration + Constraint Expression + Def *ast.FieldDefinition + Parent Expression + func (e *ObjectField) GetLocation() LocRange + func (e *ObjectField) GetParent() Expression + func (e *ObjectField) IsFloat() bool + func (e *ObjectField) TypeDesignation() string + func (f *ObjectField) MarshalYAML() (any, error) + type Operation struct + Def *ast.Definition + Type OperationType + func (e *Operation) GetLocation() LocRange + func (e *Operation) GetParent() Expression + func (e *Operation) IsFloat() bool + func (e *Operation) TypeDesignation() string + func (o *Operation) MarshalYAML() (any, error) + type OperationType int8 + const OperationTypeMutation + const OperationTypeQuery + const OperationTypeSubscription + func (t OperationType) String() string + type Parser struct + func NewParser(schema []Source) (*Parser, error) + func (p *Parser) Parse(src []byte) (operation *Operation, variables map[string]*VariableDeclaration, ...) + type Selection Expression + type SelectionField struct + Def *ast.FieldDefinition + Parent Expression + func (e *SelectionField) GetLocation() LocRange + func (e *SelectionField) GetParent() Expression + func (e *SelectionField) IsFloat() bool + func (e *SelectionField) TypeDesignation() string + func (s *SelectionField) MarshalYAML() (any, error) + type SelectionInlineFrag struct + Parent Expression + TypeCondition TypeCondition + func (e *SelectionInlineFrag) GetLocation() LocRange + func (e *SelectionInlineFrag) GetParent() Expression + func (e *SelectionInlineFrag) IsFloat() bool + func (e *SelectionInlineFrag) TypeDesignation() string + func (s *SelectionInlineFrag) MarshalYAML() (any, error) + type SelectionMax struct + Limit int + Options SelectionSet + Parent Expression + func (e *SelectionMax) GetLocation() LocRange + func (e *SelectionMax) GetParent() Expression + func (e *SelectionMax) IsFloat() bool + func (e *SelectionMax) MarshalYAML() (any, error) + func (e *SelectionMax) TypeDesignation() string + type SelectionSet struct + Selections []Selection + func (s SelectionSet) MarshalYAML() (any, error) + type Source struct + Content string + Name string + type String struct + Parent Expression + TypeDef *ast.Definition + Value string + func (e *String) GetLocation() LocRange + func (e *String) GetParent() Expression + func (e *String) IsFloat() bool + func (e *String) TypeDesignation() string + func (s *String) MarshalYAML() (any, error) + type True struct + Parent Expression + TypeDef *ast.Definition + func (e *True) GetLocation() LocRange + func (e *True) GetParent() Expression + func (e *True) IsFloat() bool + func (e *True) MarshalYAML() (any, error) + func (e *True) TypeDesignation() string + type TypeCondition struct + TypeDef *ast.Definition + TypeName string + func (c TypeCondition) MarshalYAML() (any, error) + type Variable struct + Declaration *VariableDeclaration + Parent Expression + func (e *Variable) GetLocation() LocRange + func (e *Variable) GetParent() Expression + func (e *Variable) IsFloat() bool + func (e *Variable) TypeDesignation() string + func (r *Variable) MarshalYAML() (any, error) + type VariableDeclaration struct + Name string + Parent Expression + References []Expression + func (v *VariableDeclaration) GetInfo() (schemaType *ast.Type, constr Expression) Other modules containing this package github.com/graph-guard/gqt/v4