Sha256: 8c7cefc0810267494c9278db5bc73ef5eca275ef1de6bbf140495f49053320b1

Contents?: true

Size: 644 Bytes

Versions: 1

Compression:

Stored size: 644 Bytes

Contents

module GraphQL::Batch
  class MutationExecutionStrategy < GraphQL::Batch::ExecutionStrategy
    class FieldResolution < GraphQL::Batch::ExecutionStrategy::FieldResolution
      def get_finished_value(raw_value)
        return super if execution_context.strategy.disable_batching

        raw_value = GraphQL::Batch::Promise.resolve(raw_value).sync

        execution_context.strategy.disable_batching = true
        begin
          result = super(raw_value)
          GraphQL::Batch::Executor.current.wait_all
          result
        ensure
          execution_context.strategy.disable_batching = false
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
graphql-batch-0.2.5 lib/graphql/batch/mutation_execution_strategy.rb