debian-mirror-gitlab/app/graphql/resolvers/project_pipeline_schedules_resolver.rb

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

23 lines
684 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# frozen_string_literal: true
module Resolvers
class ProjectPipelineSchedulesResolver < BaseResolver
alias_method :project, :object
type ::Types::Ci::PipelineScheduleType.connection_type, null: true
argument :status, ::Types::Ci::PipelineScheduleStatusEnum,
required: false,
description: 'Filter pipeline schedules by active status.'
2023-04-23 21:23:45 +05:30
argument :ids, [GraphQL::Types::ID],
required: false,
default_value: nil,
description: 'Filter pipeline schedules by IDs.'
def resolve(status: nil, ids: nil)
::Ci::PipelineSchedulesFinder.new(project).execute(scope: status, ids: ids)
2022-11-25 23:54:43 +05:30
end
end
end