...

Source file src/github.com/vektah/gqlparser/v2/ast/selection.go

Documentation: github.com/vektah/gqlparser/v2/ast

     1  package ast
     2  
     3  type SelectionSet []Selection
     4  
     5  type Selection interface {
     6  	isSelection()
     7  	GetPosition() *Position
     8  }
     9  
    10  func (*Field) isSelection()          {}
    11  func (*FragmentSpread) isSelection() {}
    12  func (*InlineFragment) isSelection() {}
    13  
    14  func (f *Field) GetPosition() *Position          { return f.Position }
    15  func (s *FragmentSpread) GetPosition() *Position { return s.Position }
    16  func (f *InlineFragment) GetPosition() *Position { return f.Position }
    17  
    18  type Field struct {
    19  	Alias        string
    20  	Name         string
    21  	Arguments    ArgumentList
    22  	Directives   DirectiveList
    23  	SelectionSet SelectionSet
    24  	Position     *Position `dump:"-"`
    25  	Comment      *CommentGroup
    26  
    27  	// Require validation
    28  	Definition       *FieldDefinition
    29  	ObjectDefinition *Definition
    30  }
    31  
    32  type Argument struct {
    33  	Name     string
    34  	Value    *Value
    35  	Position *Position `dump:"-"`
    36  	Comment  *CommentGroup
    37  }
    38  
    39  func (f *Field) ArgumentMap(vars map[string]interface{}) map[string]interface{} {
    40  	return arg2map(f.Definition.Arguments, f.Arguments, vars)
    41  }
    42  

View as plain text