Class: GraphQL::Language::Nodes::Argument

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

Overview

A key-value pair for a field’s inputs

Constant Summary

Constants inherited from AbstractNode

GraphQL::Language::Nodes::AbstractNode::NO_CHILDREN

Instance Attribute Summary collapse

Attributes inherited from AbstractNode

#filename

Instance Method Summary collapse

Methods inherited from AbstractNode

#==, #children_method_name, children_of_type, #col, #definition_line, #delete_child, inherited, #initialize_copy, #line, #merge, #position, #replace_child, #scalars, #to_query_string

Instance Attribute Details

#nameString

Returns the key for this argument.

Returns:

  • (String)

    the key for this argument



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

#valueString, ...

Returns The value passed for this key.

Returns:



362
363
364
# File 'lib/graphql/language/nodes.rb', line 362

def children
  @children ||= Array(value).flatten.tap { _1.select! { |v| v.is_a?(AbstractNode) } }
end

Instance Method Details

#childrenObject



362
363
364
# File 'lib/graphql/language/nodes.rb', line 362

def children
  @children ||= Array(value).flatten.tap { _1.select! { |v| v.is_a?(AbstractNode) } }
end