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

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

module Types
  class NamespaceType < BaseObject
    graphql_name 'Namespace'

    authorize :read_namespace

    field :id, GraphQL::ID_TYPE, null: false

    field :name, GraphQL::STRING_TYPE, null: false
    field :path, GraphQL::STRING_TYPE, null: false
    field :full_name, GraphQL::STRING_TYPE, null: false
    field :full_path, GraphQL::ID_TYPE, null: false

    field :description, GraphQL::STRING_TYPE, null: true
    field :visibility, GraphQL::STRING_TYPE, null: true
    field :lfs_enabled, GraphQL::BOOLEAN_TYPE, null: true, method: :lfs_enabled?
    field :request_access_enabled, GraphQL::BOOLEAN_TYPE, null: true
  end
end