Class: GraphQL::Execution::Interpreter::RawValue

Inherits:
Object
  • Object
show all
Includes:
Finalizer
Defined in:
lib/graphql/execution/interpreter/handles_raw_value.rb

Overview

Wrapper for raw values

Instance Attribute Summary

Attributes included from Finalizer

#ast_nodes, #path

Instance Method Summary collapse

Methods included from Finalizer

#ast_node, #ast_node=

Constructor Details

#initialize(obj = nil) ⇒ RawValue

: (?untyped obj) -> void



18
19
20
# File 'lib/graphql/execution/interpreter/handles_raw_value.rb', line 18

def initialize(obj = nil)
  @object = obj #: untyped
end

Instance Method Details

#finalize_graphql_result(query, result_data, result_key) ⇒ Object

: (GraphQL::Query query, untyped result_data, String | Integer result_key) -> void



13
14
15
# File 'lib/graphql/execution/interpreter/handles_raw_value.rb', line 13

def finalize_graphql_result(query, result_data, result_key)
  result_data[result_key] = @object
end

#resolve ⇒ Object

: -> untyped



23
24
25
# File 'lib/graphql/execution/interpreter/handles_raw_value.rb', line 23

def resolve
  @object
end