class GraphQL::Batch::MutationFieldExtension

Public Instance Methods

resolve(object:, arguments:, **_rest) { |object, arguments| ... } click to toggle source
# File lib/graphql/batch/mutation_field_extension.rb, line 3
def resolve(object:, arguments:, **_rest)
  GraphQL::Batch::Executor.current.clear
  begin
    ::Promise.sync(yield(object, arguments))
  ensure
    GraphQL::Batch::Executor.current.clear
  end
end