Class: GraphQL::Query::ParallelExecution::FutureFieldResolution
- Inherits:
-
Object
- Object
- GraphQL::Query::ParallelExecution::FutureFieldResolution
- Defined in:
- lib/graphql/query/parallel_execution.rb
Instance Method Summary collapse
-
#initialize(field_resolution:, future:) ⇒ FutureFieldResolution
constructor
A new instance of FutureFieldResolution.
- #result ⇒ Object
Constructor Details
#initialize(field_resolution:, future:) ⇒ FutureFieldResolution
Returns a new instance of FutureFieldResolution.
88 89 90 91 |
# File 'lib/graphql/query/parallel_execution.rb', line 88 def initialize(field_resolution:, future:) @field_resolution = field_resolution @future = future end |
Instance Method Details
#result ⇒ Object
93 94 95 96 97 |
# File 'lib/graphql/query/parallel_execution.rb', line 93 def result resolved_value = @future.value result_value = @field_resolution.get_finished_value(resolved_value) result_value end |