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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/namespace_type.rb')
-rw-r--r--app/graphql/types/namespace_type.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/graphql/types/namespace_type.rb b/app/graphql/types/namespace_type.rb
index 0f634e7c2d3..fc55ff512b6 100644
--- a/app/graphql/types/namespace_type.rb
+++ b/app/graphql/types/namespace_type.rb
@@ -63,6 +63,13 @@ module Types
description: "Timelog categories for the namespace.",
alpha: { milestone: '15.3' }
+ field :achievements,
+ Types::Achievements::AchievementType.connection_type,
+ null: true,
+ alpha: { milestone: '15.8' },
+ description: "Achievements for the namespace. " \
+ "Returns `null` if the `achievements` feature flag is disabled."
+
markdown_field :description_html, null: true
def timelog_categories
@@ -76,6 +83,10 @@ module Types
def root_storage_statistics
Gitlab::Graphql::Loaders::BatchRootStorageStatisticsLoader.new(object.id).find
end
+
+ def achievements
+ object.achievements if Feature.enabled?(:achievements, object)
+ end
end
end