class GraphQL::Language::Nodes::OperationDefinition
A query, mutation or subscription. May be anonymous or named. May be explicitly typed (eg `mutation { … }`) or implicitly a query (eg `{ … }`).
Attributes
directives[RW]
name[RW]
operation_type[RW]
selections[RW]
variables[RW]
Public Instance Methods
children()
click to toggle source
# File lib/graphql/language/nodes.rb, line 350 def children variables + directives + selections end
initialize_node(operation_type: nil, name: nil, variables: [], directives: [], selections: [])
click to toggle source
@!attribute name
@return [String, nil] The name for this operation, or `nil` if unnamed
# File lib/graphql/language/nodes.rb, line 342 def initialize_node(operation_type: nil, name: nil, variables: [], directives: [], selections: []) @operation_type = operation_type @name = name @variables = variables @directives = directives @selections = selections end
scalars()
click to toggle source
# File lib/graphql/language/nodes.rb, line 354 def scalars [operation_type, name] end