debian-mirror-gitlab/app/graphql/resolvers/ci/all_jobs_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
457 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# 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