Class: GraphQL::Execution::FieldResult Private
- Inherits:
-
Object
- Object
- GraphQL::Execution::FieldResult
- Defined in:
- lib/graphql/execution/field_result.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This is one key-value pair in a GraphQL response.
Instance Attribute Summary collapse
-
#owner ⇒ SelectionResult
readonly
private
The result object that this field belongs to.
-
#value ⇒ Any, Lazy
private
The GraphQL-ready response value, or a Lazy instance.
Instance Method Summary collapse
-
#initialize(type:, value:, owner:) ⇒ FieldResult
constructor
private
A new instance of FieldResult.
- #inspect ⇒ Object private
Constructor Details
#initialize(type:, value:, owner:) ⇒ FieldResult
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 a new instance of FieldResult.
13 14 15 16 17 |
# File 'lib/graphql/execution/field_result.rb', line 13 def initialize(type:, value:, owner:) @type = type @owner = owner self.value = value end |
Instance Attribute Details
#owner ⇒ SelectionResult (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.
Returns The result object that this field belongs to.
11 12 13 |
# File 'lib/graphql/execution/field_result.rb', line 11 def owner @owner end |
Instance Method Details
#inspect ⇒ 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.
49 50 51 |
# File 'lib/graphql/execution/field_result.rb', line 49 def inspect "#<FieldResult #{value.inspect} (#{field.type})>" end |