summaryrefslogtreecommitdiff
path: root/app/graphql/resolvers/ci/pipeline_stages_resolver.rb
blob: f9817d8b97b4af2fcdbb4a9f0b15d25c89d0646f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Resolvers
  module Ci
    class PipelineStagesResolver < BaseResolver
      include LooksAhead

      alias_method :pipeline, :object

      def resolve_with_lookahead
        apply_lookahead(pipeline.stages)
      end

      def preloads
        {
          statuses: [:needs]
        }
      end
    end
  end
end