summaryrefslogtreecommitdiff
path: root/app/graphql/types/admin/sidekiq_queues/delete_jobs_response_type.rb
blob: cc6e3db007b511bdeddc8d87cdd42d1471490643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

module Types
  module Admin
    module SidekiqQueues
      # We can't authorize against the value passed to this because it's
      # a plain hash.
      class DeleteJobsResponseType < BaseObject # rubocop:disable Graphql/AuthorizeTypes
        graphql_name 'DeleteJobsResponse'
        description 'The response from the AdminSidekiqQueuesDeleteJobs mutation'

        field :completed,
              GraphQL::Types::Boolean,
              null: true,
              description: 'Whether or not the entire queue was processed in time; if not, retrying the same request is safe.'

        field :deleted_jobs,
              GraphQL::Types::Int,
              null: true,
              description: 'The number of matching jobs deleted.'

        field :queue_size,
              GraphQL::Types::Int,
              null: true,
              description: 'The queue size after processing.'
      end
    end
  end
end