Class: GraphQL::Execution::Interpreter::Arguments
- Inherits:
-
Object
- Object
- GraphQL::Execution::Interpreter::Arguments
- Extended by:
- Forwardable
- Defined in:
- lib/graphql/execution/interpreter/arguments.rb
Overview
A wrapper for argument hashes in GraphQL queries.
Instance Attribute Summary collapse
-
#argument_values ⇒ Hash{Symbol => ArgumentValue}
readonly
-
#keyword_arguments ⇒ Hash<Symbol, Object>
readonly
The Ruby-style arguments hash, ready for a resolver.
Instance Method Summary collapse
-
#each_value ⇒ Object
Yields
ArgumentValue
instances which contain detailed metadata about each argument. -
#initialize(keyword_arguments:, argument_values:) ⇒ Arguments
constructor
A new instance of Arguments.
-
#inspect ⇒ Object
Constructor Details
#initialize(keyword_arguments:, argument_values:) ⇒ Arguments
Returns a new instance of Arguments.
18 19 20 21 |
# File 'lib/graphql/execution/interpreter/arguments.rb', line 18 def initialize(keyword_arguments:, argument_values:) @keyword_arguments = keyword_arguments @argument_values = argument_values end |
Instance Attribute Details
#argument_values ⇒ Hash{Symbol => ArgumentValue} (readonly)
29 30 31 |
# File 'lib/graphql/execution/interpreter/arguments.rb', line 29 def argument_values @argument_values end |
#keyword_arguments ⇒ Hash<Symbol, Object> (readonly)
The Ruby-style arguments hash, ready for a resolver. This hash is the one used at runtime.
16 17 18 |
# File 'lib/graphql/execution/interpreter/arguments.rb', line 16 def keyword_arguments @keyword_arguments end |
Instance Method Details
#each_value ⇒ Object
Yields ArgumentValue
instances which contain detailed metadata about each argument.
24 25 26 |
# File 'lib/graphql/execution/interpreter/arguments.rb', line 24 def each_value argument_values.each { |arg_v| yield(arg_v) } end |
#inspect ⇒ Object
33 34 35 |
# File 'lib/graphql/execution/interpreter/arguments.rb', line 33 def inspect "#<#{self.class} @keyword_arguments=#{keyword_arguments.inspect}>" end |