debian-mirror-gitlab/app/graphql/resolvers/ci/all_jobs_resolver.rb
2022-11-25 23:54:43 +05:30

17 lines
457 B
Ruby

# frozen_string_literal: true
module Resolvers
module Ci
class AllJobsResolver < BaseResolver
type ::Types::Ci::JobType.connection_type, null: true
argument :statuses, [::Types::Ci::JobStatusEnum],
required: false,
description: 'Filter jobs by status.'
def resolve(statuses: nil)
::Ci::JobsFinder.new(current_user: current_user, params: { scope: statuses }).execute
end
end
end
end