class GraphQL::Language::Nodes::InputObject
A collection of key-value inputs which may be a field argument
Attributes
arguments
[R]
Array[Argument]
Returns
-
Array<Nodes::Argument>— A list of key-value pairs inside this input object
children
[R]
Array[Argument]
Returns
-
Array<Nodes::Argument>— A list of key-value pairs inside this input object
Public Class Methods
# File lib/graphql/language/nodes.rb, line 860 def self.from_a(filename, line, col, arguments, comment: nil) self.new(filename: filename, line: line, col: col, arguments: arguments) end
(?arguments: Array[Argument], ?line: Integer?, ?col: Integer?, ?pos: Integer?, ?filename: String?, ?source: untyped) → void
Source
# File lib/graphql/language/nodes.rb, line 851 def initialize(arguments: NO_CHILDREN, line: nil, col: nil, pos: nil, filename: nil, source: nil) @line = line @col = col @pos = pos @filename = filename @source = source @arguments = arguments.freeze end
Public Instance Methods
Source
# File lib/graphql/language/nodes.rb, line 864 def marshal_dump [ line, col, # use methods here to force them to be calculated @filename, @arguments, ] end
Source
# File lib/graphql/language/nodes.rb, line 872 def marshal_load(values) @line, @col, @filename, @arguments = values end
Source
# File lib/graphql/language/nodes.rb, line 844 def merge_argument(**node_opts) merge(arguments: arguments + [GraphQL::Language::Nodes::Argument.new(**node_opts)]) end
# File lib/graphql/language/nodes.rb, line 886 def to_h(options={}) arguments.inject({}) do |memo, pair| v = pair.value memo[pair.name] = serialize_value_for_hash v memo end end
Returns
-
Hash<String, Any>— Recursively turn this input object into a Ruby Hash
Source
# File lib/graphql/language/nodes.rb, line 834 def visit_method :on_input_object end