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

organization_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: 9194d9a32c5dd9de8834ec1e46e528bf5ea7b487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

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

      authorize :read_organization

      type Types::Organizations::OrganizationType, null: true

      argument :id,
        Types::GlobalIDType[::Organizations::Organization],
        required: true,
        description: 'ID of the organization.'

      def resolve(id:)
        authorized_find!(id: id)
      end
    end
  end
end