Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pipeline_stages_resolver.rb « ci « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 98170e0cd2e31d00abf455b9d31c2ee5d57e5baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Resolvers
  module Ci
    class PipelineStagesResolver < BaseResolver
      include LooksAhead

      type Types::Ci::StageType.connection_type, null: true
      extras [:lookahead]

      alias_method :pipeline, :object

      def resolve_with_lookahead
        apply_lookahead(pipeline.stages)
      end

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