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.rb20
1 files changed, 14 insertions, 6 deletions
diff --git a/app/graphql/types/namespace_type.rb b/app/graphql/types/namespace_type.rb
index ba90fb06cb2..de6a078c6ef 100644
--- a/app/graphql/types/namespace_type.rb
+++ b/app/graphql/types/namespace_type.rb
@@ -9,24 +9,28 @@ module Types
field :id, GraphQL::Types::ID, null: false,
description: 'ID of the namespace.'
- field :name, GraphQL::Types::String, null: false,
- description: 'Name of the namespace.'
- field :path, GraphQL::Types::String, null: false,
- description: 'Path of the namespace.'
field :full_name, GraphQL::Types::String, null: false,
description: 'Full name of the namespace.'
field :full_path, GraphQL::Types::ID, null: false,
description: 'Full path of the namespace.'
+ field :name, GraphQL::Types::String, null: false,
+ description: 'Name of the namespace.'
+ field :path, GraphQL::Types::String, null: false,
+ description: 'Path of the namespace.'
+
+ 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.'
- field :visibility, GraphQL::Types::String, null: true,
- description: 'Visibility of the namespace.'
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,
description: 'Indicates if users can request access to namespace.'
+ field :visibility, GraphQL::Types::String, null: true,
+ description: 'Visibility of the namespace.'
field :root_storage_statistics, Types::RootStorageStatisticsType,
null: true,
@@ -48,6 +52,10 @@ module Types
markdown_field :description_html, null: true
+ def cross_project_pipeline_available?
+ object.licensed_feature_available?(:cross_project_pipelines)
+ end
+
def root_storage_statistics
Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end