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

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

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#col, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

child_attributes, #children, #eql?, inherited, #initialize, #position, scalar_attributes, #scalars, #to_query_string

Constructor Details

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

Instance Attribute Details

#directivesObject

Returns the value of attribute directives.



210
211
212
# File 'lib/graphql/language/nodes.rb', line 210

def directives
  @directives
end

#nameObject

Returns the value of attribute name.



210
211
212
# File 'lib/graphql/language/nodes.rb', line 210

def name
  @name
end

#operation_typeObject

Returns the value of attribute operation_type.



210
211
212
# File 'lib/graphql/language/nodes.rb', line 210

def operation_type
  @operation_type
end

#selectionsObject

Returns the value of attribute selections.



210
211
212
# File 'lib/graphql/language/nodes.rb', line 210

def selections
  @selections
end

#variablesObject

Returns the value of attribute variables.



210
211
212
# File 'lib/graphql/language/nodes.rb', line 210

def variables
  @variables
end

Instance Method Details

#initialize_node(operation_type: nil, name: nil, variables: [], directives: [], selections: []) ⇒ Object



214
215
216
217
218
219
220
# File 'lib/graphql/language/nodes.rb', line 214

def initialize_node(operation_type: nil, name: nil, variables: [], directives: [], selections: [])
  @operation_type = operation_type
  @name = name
  @variables = variables
  @directives = directives
  @selections = selections
end