Documentation ¶
Index ¶
- Constants
- func DBFetch(name sdl.NameValue_) (string, error)
- func SetDefaultDoc(doc string)
- func SetDocument(doc string)
- type Document
- type Field
- func (f *Field) AppendArgument(ss *sdl.ArgumentT)
- func (f *Field) AppendSelectionSet(ss SelectionSetProvider)
- func (f *Field) AssignAlias(input string, loc *sdl.Loc_, err *[]error)
- func (f *Field) AssignName(input string, loc *sdl.Loc_, err *[]error)
- func (f *Field) ExpandArguments(root *sdl.Field_, err *[]error) (failed bool)
- func (f *Field) GenNameAliasPath() string
- func (f *Field) SelectionSetNode()
- func (f *Field) SolicitDependents(unresolved sdl.UnresolvedMap)
- func (f *Field) StmtType() string
- func (f *Field) String() string
- type FragmentDef
- type FragmentSpread
- func (f *FragmentSpread) AssignName(input string, loc *sdl.Loc_, err *[]error)
- func (f *FragmentSpread) CheckInputValueType(err *[]error)
- func (f *FragmentSpread) SelectionSetNode()
- func (f *FragmentSpread) SolicitDependents(unresolved sdl.UnresolvedMap)
- func (f *FragmentSpread) StmtType() string
- func (f *FragmentSpread) String() string
- type FragmentStmt
- func (f *FragmentStmt) AppendSelectionSet(ss SelectionSetProvider)
- func (f *FragmentStmt) AssignName(input string, loc *sdl.Loc_, err *[]error)
- func (f *FragmentStmt) AssignTypeCond(input string, loc *sdl.Loc_, err *[]error)
- func (f *FragmentStmt) AssignTypeCondAST(err *[]error, cache *pse.Cache_)
- func (f *FragmentStmt) CheckIsInputType(err *[]error)
- func (f *FragmentStmt) FragmentNode()
- func (f *FragmentStmt) GetSelectionSet() []SelectionSetProvider
- func (f *FragmentStmt) SolicitDependents(unresolved sdl.UnresolvedMap)
- func (f *FragmentStmt) StatementNode()
- func (f *FragmentStmt) StmtName() StmtName_
- func (f *FragmentStmt) StmtType() string
- func (f *FragmentStmt) String() string
- type GQLStmtProvider
- type HasSelectionSetProvider
- type InlineFragment
- func (f *InlineFragment) AppendSelectionSet(ss SelectionSetProvider)
- func (f *InlineFragment) AssignTypeCond(input string, loc *sdl.Loc_, err *[]error)
- func (f *InlineFragment) AssignTypeCondAST(err *[]error, cache *pse.Cache_)
- func (f *InlineFragment) CheckInputValueType(err *[]error)
- func (f *InlineFragment) FragmentNode()
- func (f *InlineFragment) GetSelectionSet() []SelectionSetProvider
- func (f *InlineFragment) SelectionSetNode()
- func (f *InlineFragment) SolicitDependents(unresolved sdl.UnresolvedMap)
- func (f *InlineFragment) String() string
- type NameI
- type OperationDef
- type OperationStmt
- func (o *OperationStmt) AppendSelectionSet(ss SelectionSetProvider)
- func (o *OperationStmt) AssignName(input string, loc *sdl.Loc_, err *[]error)
- func (o *OperationStmt) CheckInputValueType(err *[]error)
- func (o *OperationStmt) CheckIsInputType(err *[]error)
- func (o *OperationStmt) GetSelectionSet() []SelectionSetProvider
- func (o *OperationStmt) OperationNode()
- func (o *OperationStmt) SolicitDependents(unresolved sdl.UnresolvedMap)
- func (o *OperationStmt) StatementNode()
- func (o *OperationStmt) StmtName() StmtName_
- func (o *OperationStmt) StmtType() string
- func (o *OperationStmt) String() string
- type PkRow
- type QLInfo
- type Scalar_
- type SelectionSetProvider
- type Statement
- type StmtName_
- type TypeRow
- type UnresolvedMap
- type VariableDef
Constants ¶
View Source
const ( OPERATION byte = iota FRAGMENT )
View Source
const (
TableName string = "GraphQL2"
)
Variables ¶
This section is empty.
Functions ¶
func SetDefaultDoc ¶
func SetDefaultDoc(doc string)
func SetDocument ¶
func SetDocument(doc string)
Types ¶
type Field ¶
type Field struct { //Type int // Fragment, InlineFragment, Field Alias sdl.Name_ Name sdl.Name_ // must have atleast a name - all else can be empty // SDLRootAST sdl.GQLTypeProvider // Parent type, populated during checkField. Could be sdl.Object_, sdl.Interface, sdl.Union_(??) SDLfld *sdl.Field_ // matching field in sdl object. populated during checkField Path string // path to field in statement // sdl.Arguments_ // promoted from struct: "Arguments []*ArgumentT" ArgumenT {Name_, value InputValue_}, InputValue_ { InputValueProvider, Loc} sdl.Directives_ SelectionSet []SelectionSetProvider //a Field whose type is an object (within the parent type to which field belongs) will have associated fields. For scalars SS wll be nil // Resolver func(context.Context, sdl.InputValueProvider, sdl.ObjectVals) <-chan string }
func (*Field) AppendArgument ¶
func (*Field) AppendSelectionSet ¶
func (f *Field) AppendSelectionSet(ss SelectionSetProvider)
func (*Field) ExpandArguments ¶
type InputValueDef struct { Desc string Name_ Type *GQLtype DefaultVal *InputValue_ Directives_ }
type Arguments_ struct { Arguments []*ArgumentT }
type ArgumentT struct { //( name : value ) Name_ Value *InputValue_ }
func (a *Arguments_) AppendArgument(ss *ArgumentT) { a.Arguments = append(a.Arguments, ss) }
func (*Field) GenNameAliasPath ¶
func (*Field) SelectionSetNode ¶
func (f *Field) SelectionSetNode()
func (*Field) SolicitDependents ¶
func (f *Field) SolicitDependents(unresolved sdl.UnresolvedMap)
type FragmentDef ¶
type FragmentSpread ¶
type FragmentSpread struct { sdl.Name_ // AST only contains reference to Fragment. At evaluation time it will be expanded to its enclosed fields. sdl.Directives_ FragStmt *FragmentStmt // associated fragment statement }
func (*FragmentSpread) AssignName ¶
func (f *FragmentSpread) AssignName(input string, loc *sdl.Loc_, err *[]error)
func (*FragmentSpread) CheckInputValueType ¶
func (f *FragmentSpread) CheckInputValueType(err *[]error)
func (*FragmentSpread) SelectionSetNode ¶
func (f *FragmentSpread) SelectionSetNode()
func (*FragmentSpread) SolicitDependents ¶
func (f *FragmentSpread) SolicitDependents(unresolved sdl.UnresolvedMap)
func (*FragmentSpread) StmtType ¶
func (f *FragmentSpread) StmtType() string
func (*FragmentSpread) String ¶
func (f *FragmentSpread) String() string
type FragmentStmt ¶
type FragmentStmt struct { //NodeDef // partially implements Node interface - concrete type must assign its own String method // Name sdl.Name_ // on <type> TypeCond sdl.Name_ TypeCondAST sdl.GQLTypeProvider sdl.Directives_ SelectionSet []SelectionSetProvider // inline fragments, fragment spreads, sdl field from sdl type TypeCond. }
func (*FragmentStmt) AppendSelectionSet ¶
func (f *FragmentStmt) AppendSelectionSet(ss SelectionSetProvider)
func (*FragmentStmt) AssignName ¶
func (f *FragmentStmt) AssignName(input string, loc *sdl.Loc_, err *[]error)
func (*FragmentStmt) AssignTypeCond ¶
func (f *FragmentStmt) AssignTypeCond(input string, loc *sdl.Loc_, err *[]error)
func (*FragmentStmt) AssignTypeCondAST ¶
func (f *FragmentStmt) AssignTypeCondAST(err *[]error, cache *pse.Cache_)
func (*FragmentStmt) CheckIsInputType ¶
func (f *FragmentStmt) CheckIsInputType(err *[]error)
func (*FragmentStmt) FragmentNode ¶
func (f *FragmentStmt) FragmentNode()
func (*FragmentStmt) GetSelectionSet ¶
func (f *FragmentStmt) GetSelectionSet() []SelectionSetProvider
func (*FragmentStmt) SolicitDependents ¶
func (f *FragmentStmt) SolicitDependents(unresolved sdl.UnresolvedMap)
func (*FragmentStmt) StatementNode ¶
func (f *FragmentStmt) StatementNode()
func (*FragmentStmt) StmtName ¶
func (f *FragmentStmt) StmtName() StmtName_
func (*FragmentStmt) StmtType ¶
func (f *FragmentStmt) StmtType() string
func (*FragmentStmt) String ¶
func (f *FragmentStmt) String() string
type GQLStmtProvider ¶
type HasSelectionSetProvider ¶
type HasSelectionSetProvider interface {
AppendSelectionSet(ss SelectionSetProvider) // TODO - this method may not be appropriate for this interface.
}
these are the ast structures that have a selectionset collection, which maybe different to the objects contained in the selectionset
*OperationStmt) AppendSelectionSet(ss SelectionSetProvider) { *FragmentStmt) AppendSelectionSet(ss SelectionSetProvider) { *InlineFragment) AppendSelectionSet(ss SelectionSetProvider) { *Field) AppendSelectionSet(ss SelectionSetProvider) {
type InlineFragment ¶
type InlineFragment struct { // //Parent HasSelectionSetProvider sdl.Name_ // dummy name supplied to hold location info TypeCond sdl.Name_ // supplied by typeCondition if specified, otherwise its the type of the parent object's selectionset. TypeCondAST sdl.GQLTypeProvider // populated during checkField?? // sdl.Directives_ SelectionSet []SelectionSetProvider // { only fields and ... fragments. Nil when no TypeCond and adopts selectionSet of enclosing context. }
func (*InlineFragment) AppendSelectionSet ¶
func (f *InlineFragment) AppendSelectionSet(ss SelectionSetProvider)
func (*InlineFragment) AssignTypeCond ¶
func (f *InlineFragment) AssignTypeCond(input string, loc *sdl.Loc_, err *[]error)
func (*InlineFragment) AssignTypeCondAST ¶
func (f *InlineFragment) AssignTypeCondAST(err *[]error, cache *pse.Cache_)
func (*InlineFragment) CheckInputValueType ¶
func (f *InlineFragment) CheckInputValueType(err *[]error)
func (*InlineFragment) FragmentNode ¶
func (f *InlineFragment) FragmentNode()
func (f *InlineFragment) Resolve() {}
func (*InlineFragment) GetSelectionSet ¶
func (f *InlineFragment) GetSelectionSet() []SelectionSetProvider
func (*InlineFragment) SelectionSetNode ¶
func (f *InlineFragment) SelectionSetNode()
func (*InlineFragment) SolicitDependents ¶
func (f *InlineFragment) SolicitDependents(unresolved sdl.UnresolvedMap)
func (*InlineFragment) String ¶
func (f *InlineFragment) String() string
type OperationDef ¶
type OperationDef interface {
OperationNode()
}
type OperationStmt ¶
type OperationStmt struct { // Type string // query, mutation, subscription SelectionSet []SelectionSetProvider // { only fields and ... fragments // //NodeDef // partially implements Node interface - concrete type must assign its own String method // Name sdl.Name_ // validated Variable []*VariableDef sdl.Directives_ SelectionSet []SelectionSetProvider // { selection-List: fields,... } }
func (*OperationStmt) AppendSelectionSet ¶
func (o *OperationStmt) AppendSelectionSet(ss SelectionSetProvider)
func (*OperationStmt) AssignName ¶
func (o *OperationStmt) AssignName(input string, loc *sdl.Loc_, err *[]error)
func (o *OperationStmt) ExecutableDefinition() {}
func (*OperationStmt) CheckInputValueType ¶
func (o *OperationStmt) CheckInputValueType(err *[]error)
func (*OperationStmt) CheckIsInputType ¶
func (o *OperationStmt) CheckIsInputType(err *[]error)
func (*OperationStmt) GetSelectionSet ¶
func (o *OperationStmt) GetSelectionSet() []SelectionSetProvider
func (*OperationStmt) OperationNode ¶
func (o *OperationStmt) OperationNode()
func (*OperationStmt) SolicitDependents ¶
func (o *OperationStmt) SolicitDependents(unresolved sdl.UnresolvedMap)
func (*OperationStmt) StatementNode ¶
func (o *OperationStmt) StatementNode()
func (*OperationStmt) StmtName ¶
func (o *OperationStmt) StmtName() StmtName_
func (*OperationStmt) StmtType ¶
func (o *OperationStmt) StmtType() string
func (*OperationStmt) String ¶
func (o *OperationStmt) String() string
type SelectionSetProvider ¶
type SelectionSetProvider interface { SelectionSetNode() SolicitDependents(unresolved sdl.UnresolvedMap) // TODO: don't like this here. // Resolve() String() string }
type Statement ¶
type Statement struct { Type string // Operational | Fragment Name string AST GQLStmtProvider // AST of operational stmt (query,mutation,sub) or Fragment stmt RootAST sdl.GQLTypeProvider // AST of type which represents the entry point to the graph, from schema(query:<entryType>,... Typically type Query. }
type UnresolvedMap ¶
type UnresolvedMap sdl.UnresolvedMap //¬333map[Name_]*sdl.GQLtype
type VariableDef ¶
type VariableDef struct { sdl.Name_ Type *sdl.GQLtype DefaultVal *sdl.InputValue_ Value *sdl.InputValue_ // assigned by variable statment, defined outside of operationalStmt }
func (*VariableDef) AssignName ¶
func (v *VariableDef) AssignName(input string, loc *sdl.Loc_, err *[]error)
func (*VariableDef) AssignType ¶
func (n *VariableDef) AssignType(t *sdl.GQLtype)
func (*VariableDef) SolicitDependents ¶
func (n *VariableDef) SolicitDependents(unresolved sdl.UnresolvedMap)
func (*VariableDef) String ¶
func (v *VariableDef) String() string
Click to show internal directories.
Click to hide internal directories.