summaryrefslogtreecommitdiff
path: root/app/graphql/types/namespace_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/namespace_type.rb')
-rw-r--r--app/graphql/types/namespace_type.rb41
1 files changed, 29 insertions, 12 deletions
diff --git a/app/graphql/types/namespace_type.rb b/app/graphql/types/namespace_type.rb
index de6a078c6ef..0f634e7c2d3 100644
--- a/app/graphql/types/namespace_type.rb
+++ b/app/graphql/types/namespace_type.rb
@@ -7,38 +7,45 @@ module Types
authorize :read_namespace
field :id, GraphQL::Types::ID, null: false,
- description: 'ID of the namespace.'
+ description: 'ID of the namespace.'
field :full_name, GraphQL::Types::String, null: false,
- description: 'Full name of the namespace.'
+ description: 'Full name of the namespace.'
field :full_path, GraphQL::Types::ID, null: false,
- description: 'Full path of the namespace.'
+ description: 'Full path of the namespace.'
field :name, GraphQL::Types::String, null: false,
- description: 'Name of the namespace.'
+ description: 'Name of the namespace.'
field :path, GraphQL::Types::String, null: false,
- description: 'Path of the namespace.'
+ description: 'Path of the namespace.'
- field :cross_project_pipeline_available, GraphQL::Types::Boolean, null: false,
+ field :cross_project_pipeline_available,
+ GraphQL::Types::Boolean,
+ null: false,
resolver_method: :cross_project_pipeline_available?,
description: 'Indicates if the cross_project_pipeline feature is available for the namespace.'
field :description, GraphQL::Types::String, null: true,
- description: 'Description of the namespace.'
+ description: 'Description of the namespace.'
- field :lfs_enabled, GraphQL::Types::Boolean, null: true, method: :lfs_enabled?,
+ field :lfs_enabled,
+ GraphQL::Types::Boolean,
+ null: true,
+ method: :lfs_enabled?,
description: 'Indicates if Large File Storage (LFS) is enabled for namespace.'
- field :request_access_enabled, GraphQL::Types::Boolean, null: true,
+ field :request_access_enabled,
+ GraphQL::Types::Boolean,
+ null: true,
description: 'Indicates if users can request access to namespace.'
field :visibility, GraphQL::Types::String, null: true,
- description: 'Visibility of the namespace.'
+ description: 'Visibility of the namespace.'
field :root_storage_statistics, Types::RootStorageStatisticsType,
null: true,
description: 'Aggregated storage statistics of the namespace. Only available for root namespaces.'
field :projects, Types::ProjectType.connection_type, null: false,
- description: 'Projects within this namespace.',
- resolver: ::Resolvers::NamespaceProjectsResolver
+ description: 'Projects within this namespace.',
+ resolver: ::Resolvers::NamespaceProjectsResolver
field :package_settings,
Types::Namespace::PackageSettingsType,
@@ -50,8 +57,18 @@ module Types
null: true,
description: "Shared runners availability for the namespace and its descendants."
+ field :timelog_categories,
+ Types::TimeTracking::TimelogCategoryType.connection_type,
+ null: true,
+ description: "Timelog categories for the namespace.",
+ alpha: { milestone: '15.3' }
+
markdown_field :description_html, null: true
+ def timelog_categories
+ object.timelog_categories if Feature.enabled?(:timelog_categories)
+ end
+
def cross_project_pipeline_available?
object.licensed_feature_available?(:cross_project_pipelines)
end