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

Included in:
GraphQLResultArray, GraphQLResultHash
Defined in:
lib/graphql/execution/interpreter/runtime.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_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.



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

def graphql_dead
  @graphql_dead
end

#graphql_non_null_field_namesnil, Array<String>

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.

Although these are used by only one of the Result classes, it’s handy to have the methods implemented on both (even though they just return nil) because it makes it easy to check if anything is assigned.

Returns:

  • (nil, Array<String>)


30
31
32
# File 'lib/graphql/execution/interpreter/runtime.rb', line 30

def graphql_non_null_field_names
  @graphql_non_null_field_names
end

#graphql_non_null_list_itemsnil, true

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:

  • (nil, true)


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

def graphql_non_null_list_items
  @graphql_non_null_list_items
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.



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

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)



35
36
37
# File 'lib/graphql/execution/interpreter/runtime.rb', line 35

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.



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

def graphql_result_name
  @graphql_result_name
end

Instance Method Details

#initialize(result_name, parent_result) ⇒ 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.



13
14
15
16
17
18
19
20
21
# File 'lib/graphql/execution/interpreter/runtime.rb', line 13

def initialize(result_name, parent_result)
  @graphql_parent = parent_result
  if parent_result && parent_result.graphql_dead
    @graphql_dead = true
  end
  @graphql_result_name = result_name
  # Jump through some hoops to avoid creating this duplicate storage if at all possible.
  @graphql_metadata = nil
end