Documentation ¶
Index ¶
- Constants
- func IsValidDirective(d string) bool
- type Argument
- type BooleanValue
- type Definition
- type DefinitionKind
- type Directive
- type DirectiveDefinition
- type Document
- type EnumDefinition
- type EnumValue
- type EnumValueDefinition
- type Field
- type FieldDefinition
- type Fields
- type FloatValue
- type Fragment
- type FragmentSpread
- type InlineFragment
- type InputObjectDefinition
- type InputValueDefinition
- type IntValue
- type InterfaceDefinition
- type ListType
- type ListValue
- type Location
- type NamedType
- type NonNullType
- type NullValue
- type ObjectDefinition
- type ObjectFieldValue
- type ObjectValue
- type Operation
- type OperationType
- type ScalarDefinition
- type SchemaDefinition
- type Selection
- type SelectionKind
- type StringValue
- type Type
- type TypeKind
- type UnionDefinition
- type Value
- type ValueKind
- type Variable
- type VariableValue
Constants ¶
View Source
const ( // Executable directive locations QueryDirectiveLocation string = "QUERY" MutationDirectiveLocation string = "MUTATION" SubscriptionDirectiveLocation string = "SUBSCRIPTION" FieldDirectiveLocation string = "FIELD" FragmentDefinitionDirectiveLocation string = "FRAGMENT_DEFINITION" FragmentSpreadDirectiveLocation string = "FRAGMENT_SPREAD" InlineFragmentDirectiveLocation string = "INLINE_FRAGMENT" // TypeSystem directive locations SchemaDirectiveLocation string = "SCHEMA" ScalarDirectiveLocation string = "SCALAR" ObjectDirectiveLocation string = "OBJECT" FieldDefinitionDirectiveLocation string = "FIELD_DEFINITION" ArguentDefinitionDirectiveLocation string = "ARGUMENT_DEFINITION" InterfaceDirectiveLocation string = "INTERFACE" UnionDirectiveLocation string = "UNION" EnumDirectiveLocation string = "ENUM" EnumValueDirectiveLocation string = "ENUM_VALUE" InputObjectDirectiveLocation string = "INPUT_OBJECT" InputFieldDefinitionDirectiveLocation string = "INPUT_FIELD_DEFINITION" )
Variables ¶
This section is empty.
Functions ¶
func IsValidDirective ¶ added in v0.3.1
Types ¶
type BooleanValue ¶
func (*BooleanValue) GetLocation ¶ added in v0.2.0
func (v *BooleanValue) GetLocation() Location
func (*BooleanValue) GetValue ¶
func (v *BooleanValue) GetValue() interface{}
func (*BooleanValue) Kind ¶
func (v *BooleanValue) Kind() ValueKind
type Definition ¶ added in v0.3.1
type Definition interface {
Kind() DefinitionKind
}
type DefinitionKind ¶ added in v0.3.1
type DefinitionKind uint
const ( SchemaKind DefinitionKind = iota ScalarKind ObjectKind InterfaceKind UnionKind EnumKind InputObjectKind DirectiveKind )
type DirectiveDefinition ¶ added in v0.3.1
type DirectiveDefinition struct { Description string Name string Locations []string Arguments []*InputValueDefinition }
func (*DirectiveDefinition) Kind ¶ added in v0.3.1
func (d *DirectiveDefinition) Kind() DefinitionKind
type Document ¶
type Document struct { Operations []*Operation Fragments []*Fragment Definitions []Definition }
func NewDocument ¶
func NewDocument() *Document
type EnumDefinition ¶ added in v0.3.1
type EnumDefinition struct { Description string Name string Directives []*Directive Values []*EnumValueDefinition }
func (*EnumDefinition) Kind ¶ added in v0.3.1
func (d *EnumDefinition) Kind() DefinitionKind
type EnumValue ¶
func (*EnumValue) GetLocation ¶ added in v0.2.0
type EnumValueDefinition ¶ added in v0.3.1
type Field ¶
type Field struct { Alias string Name string ParentType string Arguments []*Argument Directives []*Directive SelectionSet []Selection Location Location }
func (*Field) GetDirectives ¶
func (*Field) Kind ¶
func (f *Field) Kind() SelectionKind
type FieldDefinition ¶ added in v0.3.1
type FieldDefinition struct { Description string Name string Arguments []*InputValueDefinition Type Type Directives []*Directive }
type FloatValue ¶
func (*FloatValue) GetLocation ¶ added in v0.2.0
func (v *FloatValue) GetLocation() Location
func (*FloatValue) GetValue ¶
func (v *FloatValue) GetValue() interface{}
func (*FloatValue) Kind ¶
func (v *FloatValue) Kind() ValueKind
type FragmentSpread ¶
func (*FragmentSpread) GetDirectives ¶
func (fs *FragmentSpread) GetDirectives() []*Directive
func (*FragmentSpread) Kind ¶
func (fs *FragmentSpread) Kind() SelectionKind
type InlineFragment ¶
type InlineFragment struct { TypeCondition string Directives []*Directive SelectionSet []Selection Location Location }
func (*InlineFragment) GetDirectives ¶
func (inf *InlineFragment) GetDirectives() []*Directive
func (*InlineFragment) Kind ¶
func (inf *InlineFragment) Kind() SelectionKind
type InputObjectDefinition ¶ added in v0.3.1
type InputObjectDefinition struct { Description string Name string Directives []*Directive Fields []*InputValueDefinition }
func (*InputObjectDefinition) Kind ¶ added in v0.3.1
func (d *InputObjectDefinition) Kind() DefinitionKind
type InputValueDefinition ¶ added in v0.3.1
type IntValue ¶
func (*IntValue) GetLocation ¶ added in v0.2.0
type InterfaceDefinition ¶ added in v0.3.1
type InterfaceDefinition struct { Description string Name string Directives []*Directive Fields []*FieldDefinition }
func (*InterfaceDefinition) Kind ¶ added in v0.3.1
func (d *InterfaceDefinition) Kind() DefinitionKind
type ListValue ¶
func (*ListValue) GetLocation ¶ added in v0.2.0
type NonNullType ¶
func (*NonNullType) GetValue ¶
func (t *NonNullType) GetValue() interface{}
func (*NonNullType) Kind ¶
func (t *NonNullType) Kind() TypeKind
type NullValue ¶
func (*NullValue) GetLocation ¶ added in v0.2.0
type ObjectDefinition ¶ added in v0.3.1
type ObjectDefinition struct { Description string Name string Implements []*NamedType Directives []*Directive Fields []*FieldDefinition }
func (*ObjectDefinition) Kind ¶ added in v0.3.1
func (d *ObjectDefinition) Kind() DefinitionKind
type ObjectFieldValue ¶
func (*ObjectFieldValue) GetLocation ¶ added in v0.2.0
func (v *ObjectFieldValue) GetLocation() Location
func (*ObjectFieldValue) GetValue ¶
func (v *ObjectFieldValue) GetValue() interface{}
func (*ObjectFieldValue) Kind ¶
func (v *ObjectFieldValue) Kind() ValueKind
type ObjectValue ¶
type ObjectValue struct { Fields []*ObjectFieldValue Location Location }
func (*ObjectValue) GetLocation ¶ added in v0.2.0
func (v *ObjectValue) GetLocation() Location
func (*ObjectValue) GetValue ¶
func (v *ObjectValue) GetValue() interface{}
func (*ObjectValue) Kind ¶
func (v *ObjectValue) Kind() ValueKind
type Operation ¶
type Operation struct { OperationType OperationType Name string Variables []*Variable Directives []*Directive SelectionSet []Selection Location Location }
func NewOperation ¶
func NewOperation(ot OperationType) *Operation
type OperationType ¶
type OperationType int
const ( Query OperationType = iota Mutation Subscription )
type ScalarDefinition ¶ added in v0.3.1
func (*ScalarDefinition) Kind ¶ added in v0.3.1
func (d *ScalarDefinition) Kind() DefinitionKind
type SchemaDefinition ¶ added in v0.3.1
type SchemaDefinition struct { Name string Directives []*Directive RootOperations map[OperationType]*NamedType }
func (*SchemaDefinition) Kind ¶ added in v0.3.1
func (d *SchemaDefinition) Kind() DefinitionKind
type Selection ¶
type Selection interface { Kind() SelectionKind GetDirectives() []*Directive }
type SelectionKind ¶
type SelectionKind int
const ( FieldSelectionKind SelectionKind = iota FragmentSpreadSelectionKind InlineFragmentSelectionKind )
type StringValue ¶
func (*StringValue) GetLocation ¶ added in v0.2.0
func (v *StringValue) GetLocation() Location
func (*StringValue) GetValue ¶
func (v *StringValue) GetValue() interface{}
func (*StringValue) Kind ¶
func (v *StringValue) Kind() ValueKind
type UnionDefinition ¶ added in v0.3.1
type UnionDefinition struct { Description string Name string Directives []*Directive Members []*NamedType }
func (*UnionDefinition) Kind ¶ added in v0.3.1
func (d *UnionDefinition) Kind() DefinitionKind
type VariableValue ¶
func (*VariableValue) GetLocation ¶ added in v0.2.0
func (v *VariableValue) GetLocation() Location
func (*VariableValue) GetValue ¶
func (v *VariableValue) GetValue() interface{}
func (*VariableValue) Kind ¶
func (v *VariableValue) Kind() ValueKind
Click to show internal directories.
Click to hide internal directories.