debian-mirror-gitlab/app/graphql/resolvers/project_pipeline_schedules_resolver.rb
2023-04-23 21:23:45 +05:30

22 lines
684 B
Ruby

# 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.'
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)
end
end
end