Class: GraphQL::Execution::Interpreter::ArgumentValue
- Inherits:
-
Object
- Object
- GraphQL::Execution::Interpreter::ArgumentValue
- Defined in:
- lib/graphql/execution/interpreter/argument_value.rb
Overview
A container for metadata regarding arguments present in a GraphQL query. See Interpreter::Arguments#argument_values for a hash of these objects.
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns.
-
#original_value ⇒ Object
readonly
Returns.
-
#value ⇒ Object
readonly
Returns.
Instance Method Summary collapse
-
#default_used? ⇒ Boolean
Returns.
-
#initialize(definition:, value:, original_value:, default_used:) ⇒ ArgumentValue
constructor
A new instance of ArgumentValue.
Constructor Details
#initialize(definition:, value:, original_value:, default_used:) ⇒ ArgumentValue
Returns a new instance of ArgumentValue.
11 12 13 14 15 16 |
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 11 def initialize(definition:, value:, original_value:, default_used:) @definition = definition @value = value @original_value = original_value @default_used = default_used end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns
GraphQL::Schema::Argument— The definition instance for this argument
31 32 33 |
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 31 def definition @definition end |
#original_value ⇒ Object (readonly)
Returns
Object— The value of this argument beforeprepareis applied.
26 27 28 |
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 26 def original_value @original_value end |
#value ⇒ Object (readonly)
Returns
Object— The Ruby-ready value for this Argument
21 22 23 |
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 21 def value @value end |
Instance Method Details
#default_used? ⇒ Boolean
Returns
Boolean—trueif the schema-defineddefault_value:was applied in this case. (No client-provided value was present.)
:call-seq:
default_used?() -> bool
39 40 41 |
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 39 def default_used? @default_used end |