Sha256: 54e293e24828fd2e540b9c32a5eca8e7c6cddc2650b969dfe069b05d5e60e55c

Contents?: true

Size: 327 Bytes

Versions: 11

Compression:

Stored size: 327 Bytes

Contents

module GraphQL::Batch
  class MutationFieldExtension < GraphQL::Schema::FieldExtension
    def resolve(object:, arguments:, **_rest)
      GraphQL::Batch::Executor.current.clear
      begin
        ::Promise.sync(yield(object, arguments))
      ensure
        GraphQL::Batch::Executor.current.clear
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
graphql-batch-0.6.0 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.5.4 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.5.3 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.5.2 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.5.1 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.5.0 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.4.3 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.4.2 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.4.1 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-edge-0.4.0 lib/graphql/batch/mutation_field_extension.rb
graphql-batch-0.4.0 lib/graphql/batch/mutation_field_extension.rb