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

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

module Resolvers
  module Organizations
    class ProjectsResolver < BaseResolver
      include Gitlab::Graphql::Authorize::AuthorizeResource

      type Types::ProjectType, null: true

      authorize :read_project

      alias_method :organization, :object

      def resolve
        ::ProjectsFinder.new(current_user: current_user, params: { organization: organization }).execute
      end
    end
  end
end