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.
Instance Attribute Summary collapse
- 
  
    
      #definition  ⇒ GraphQL::Schema::Argument 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The definition instance for this argument.
 - 
  
    
      #original_value  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The value of this argument before
prepareis applied. - 
  
    
      #value  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The Ruby-ready value for this Argument.
 
Instance Method Summary collapse
- 
  
    
      #default_used?  ⇒ Boolean 
    
    
  
  
  
  
  
  
  
  
  
    
trueif the schema-defineddefault_value:was applied in this case. - 
  
    
      #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.
      9 10 11 12 13 14  | 
    
      # File 'lib/graphql/execution/interpreter/argument_value.rb', line 9 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 ⇒ GraphQL::Schema::Argument (readonly)
Returns The definition instance for this argument.
      23 24 25  | 
    
      # File 'lib/graphql/execution/interpreter/argument_value.rb', line 23 def definition @definition end  | 
  
#original_value ⇒ Object (readonly)
Returns The value of this argument before prepare is applied.
      20 21 22  | 
    
      # File 'lib/graphql/execution/interpreter/argument_value.rb', line 20 def original_value @original_value end  | 
  
#value ⇒ Object (readonly)
Returns The Ruby-ready value for this Argument.
      17 18 19  | 
    
      # File 'lib/graphql/execution/interpreter/argument_value.rb', line 17 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.).
      26 27 28  | 
    
      # File 'lib/graphql/execution/interpreter/argument_value.rb', line 26 def default_used? @default_used end  |