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

nested_environments_resolver.rb « environments « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f043270beca3cfe4193ac7d40734fa1e512bf3ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Resolvers
  module Environments
    class NestedEnvironmentsResolver < EnvironmentsResolver
      include Gitlab::Graphql::Authorize::AuthorizeResource

      type Types::NestedEnvironmentType, null: true

      authorizes_object!
      authorize :read_environment

      def resolve(**args)
        offset_pagination(super(**args).nested)
      end
    end
  end
end