Module: GraphQL::Execution::Interpreter::Runtime::GraphQLResult Private

Included in:
GraphQLResultArray, GraphQLResultHash
Defined in:
lib/graphql/execution/interpreter/runtime/graphql_result.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#graphql_application_valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_application_value
  @graphql_application_value
end

#graphql_deadObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



32
33
34
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 32

def graphql_dead
  @graphql_dead
end

#graphql_is_eagerObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_is_eager
  @graphql_is_eager
end

#graphql_is_non_null_in_parentObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_is_non_null_in_parent
  @graphql_is_non_null_in_parent
end

#graphql_parentObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_parent
  @graphql_parent
end

#graphql_result_dataHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Plain-Ruby result data (@graphql_metadata contains Result wrapper objects).

Returns:

  • (Hash)

    Plain-Ruby result data (@graphql_metadata contains Result wrapper objects)



37
38
39
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 37

def graphql_result_data
  @graphql_result_data
end

#graphql_result_nameObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_result_name
  @graphql_result_name
end

#graphql_result_typeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_result_type
  @graphql_result_type
end

#graphql_selectionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 33

def graphql_selections
  @graphql_selections
end

Instance Method Details

#build_path(path_array) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



27
28
29
30
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 27

def build_path(path_array)
  graphql_result_name && path_array.unshift(graphql_result_name)
  @graphql_parent ? @graphql_parent.build_path(path_array) : path_array
end

#initialize(result_name, result_type, application_value, parent_result, is_non_null_in_parent, selections, is_eager) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/graphql/execution/interpreter/runtime/graphql_result.rb', line 8

def initialize(result_name, result_type, application_value, parent_result, is_non_null_in_parent, selections, is_eager)
  @graphql_parent = parent_result
  @graphql_application_value = application_value
  @graphql_result_type = result_type
  if parent_result && parent_result.graphql_dead
    @graphql_dead = true
  end
  @graphql_result_name = result_name
  @graphql_is_non_null_in_parent = is_non_null_in_parent
  # Jump through some hoops to avoid creating this duplicate storage if at all possible.
  @graphql_metadata = nil
  @graphql_selections = selections
  @graphql_is_eager = is_eager
end

#pathObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



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

def path
  @path ||= build_path([])
end