Class: GraphQL::Execution::Interpreter::ArgumentValue

Inherits:
Object
  • Object
show all
Defined in:
lib/graphql/execution/interpreter/argument_value.rb

Overview

A container for metadata regarding arguments present in a GraphQL query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(definition:, value:, default_used:) ⇒ ArgumentValue

Returns a new instance of ArgumentValue.


9
10
11
12
13
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 9

def initialize(definition:, value:, default_used:)
  @definition = definition
  @value = value
  @default_used = default_used
end

Instance Attribute Details

#definitionGraphQL::Schema::Argument (readonly)

Returns The definition instance for this argument.

Returns:


19
20
21
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 19

def definition
  @definition
end

#valueObject (readonly)

Returns The Ruby-ready value for this Argument.

Returns:

  • (Object)

    The Ruby-ready value for this Argument


16
17
18
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 16

def value
  @value
end

Instance Method Details

#default_used?Boolean

Returns true if the schema-defined default_value: was applied in this case. (No client-provided value was present.).

Returns:

  • (Boolean)

    true if the schema-defined default_value: was applied in this case. (No client-provided value was present.)


22
23
24
# File 'lib/graphql/execution/interpreter/argument_value.rb', line 22

def default_used?
  @default_used
end