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

organizations_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: ab21a84645b95fee184290ba1e8a1da6cf873893 (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 OrganizationsResolver < BaseResolver
      include Gitlab::Graphql::Authorize::AuthorizeResource

      type Types::Organizations::OrganizationType.connection_type, null: true
      authorize :read_organization

      def resolve
        # For the Organization MVC, all the organizations are public. We need to change this to only accessible
        # organizations once we start supporting private organizations.
        # See https://gitlab.com/groups/gitlab-org/-/epics/10649.
        ::Organizations::Organization.all
      end
    end
  end
end