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

#col, #filename, #line

Instance Method Summary collapse

Methods inherited from AbstractNode

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

Constructor Details

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

Instance Attribute Details

#nameString

Returns the key for this argument.

Returns:

  • (String)

    the key for this argument



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

#valueString, ...

Returns The value passed for this key.

Returns:

  • (String, Float, Integer, Boolean, Array, InputObject)

    The value passed for this key



296
297
298
# File 'lib/graphql/language/nodes.rb', line 296

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

Instance Method Details

#childrenObject



296
297
298
# File 'lib/graphql/language/nodes.rb', line 296

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