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
- #graphql_dead ⇒ Object private
- #graphql_is_non_null_in_parent ⇒ Object readonly private
- #graphql_parent ⇒ Object readonly private
-
#graphql_result_data ⇒ Hash
private
Plain-Ruby result data (
@graphql_metadata
contains Result wrapper objects). - #graphql_result_name ⇒ Object readonly private
Instance Method Summary collapse
- #build_path(path_array) ⇒ Object private
- #initialize(result_name, parent_result, is_non_null_in_parent) ⇒ Object private
- #path ⇒ Object private
Instance Attribute Details
#graphql_dead ⇒ 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.
45 46 47 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 45 def graphql_dead @graphql_dead end |
#graphql_is_non_null_in_parent ⇒ Object (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.
46 47 48 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 46 def graphql_is_non_null_in_parent @graphql_is_non_null_in_parent end |
#graphql_parent ⇒ Object (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.
46 47 48 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 46 def graphql_parent @graphql_parent end |
#graphql_result_data ⇒ Hash
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).
49 50 51 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 49 def graphql_result_data @graphql_result_data end |
#graphql_result_name ⇒ Object (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.
46 47 48 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 46 def graphql_result_name @graphql_result_name 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.
40 41 42 43 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 40 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, parent_result, is_non_null_in_parent) ⇒ 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.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 25 def initialize(result_name, parent_result, is_non_null_in_parent) @graphql_parent = parent_result 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 end |
#path ⇒ 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.
36 37 38 |
# File 'lib/graphql/execution/interpreter/runtime.rb', line 36 def path @path ||= build_path([]) end |