Class: GraphQL::Language::Nodes::InputObject
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- GraphQL::Language::Nodes::InputObject
- Defined in:
- lib/graphql/language/nodes.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
Attributes inherited from AbstractNode
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
#arguments ⇒ Object
Returns the value of attribute arguments.
188 189 190 |
# File 'lib/graphql/language/nodes.rb', line 188 def arguments @arguments end |
Instance Method Details
#initialize_node(arguments: []) ⇒ Object
191 192 193 |
# File 'lib/graphql/language/nodes.rb', line 191 def initialize_node(arguments: []) @arguments = arguments end |
#to_h(options = {}) ⇒ Object
195 196 197 198 199 200 201 |
# File 'lib/graphql/language/nodes.rb', line 195 def to_h(={}) arguments.inject({}) do |memo, pair| v = pair.value memo[pair.name] = v.is_a?(InputObject) ? v.to_h : v memo end end |