Class: GraphQL::Query::Context
- Inherits:
-
Object
- Object
- GraphQL::Query::Context
- Defined in:
- lib/graphql/parallel/monkey_patches.rb
Instance Method Summary collapse
-
#async(&block) ⇒ Object
For Parallel::ExecutionStrategy, make a promise.
Instance Method Details
#async(&block) ⇒ Object
For Parallel::ExecutionStrategy, make a promise. Otherwise, it’s not really async.
6 7 8 9 10 11 12 |
# File 'lib/graphql/parallel/monkey_patches.rb', line 6 def async(&block) if execution_strategy.respond_to?(:async) execution_strategy.async(block) else block.call end end |