Class: GraphQL::Language::Nodes::OperationDefinition

Inherits:
AbstractNode
  • Object
show all
Defined in:
lib/graphql/language/nodes.rb

Overview

A query, mutation or subscription. May be anonymous or named. May be explicitly typed (eg mutation { ... }) or implicitly a query (eg { ... }).

Constant Summary

Constants inherited from AbstractNode

AbstractNode::NO_CHILDREN

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #filename, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

#children, #delete_child, #eql?, inherited, #initialize, #initialize_copy, #merge, #position, #replace_child, #scalars, #to_query_string, #visit_method

Constructor Details

This class inherits a constructor from GraphQL::Language::Nodes::AbstractNode

Instance Attribute Details

#nameString?

Returns The name for this operation, or nil if unnamed

Returns:

  • (String, nil)

    The name for this operation, or nil if unnamed



522
523
524
# File 'lib/graphql/language/nodes.rb', line 522

def children_method_name
  :definitions
end

#operation_typeString?

Returns The root type for this operation, or nil for implicit "query"

Returns:

  • (String, nil)

    The root type for this operation, or nil for implicit "query"



# File 'lib/graphql/language/nodes.rb', line 516

#selectionsArray<Field>

Returns Root-level fields on this operation

Returns:

  • (Array<Field>)

    Root-level fields on this operation



# File 'lib/graphql/language/nodes.rb', line 513

#variablesArray<VariableDefinition>

Returns Variable definitions for this operation

Returns:



# File 'lib/graphql/language/nodes.rb', line 510

Instance Method Details

#children_method_nameObject



522
523
524
# File 'lib/graphql/language/nodes.rb', line 522

def children_method_name
  :definitions
end