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/milestone_stats_type.rb')
-rw-r--r--app/graphql/types/milestone_stats_type.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/graphql/types/milestone_stats_type.rb b/app/graphql/types/milestone_stats_type.rb
new file mode 100644
index 00000000000..ef533af59e7
--- /dev/null
+++ b/app/graphql/types/milestone_stats_type.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Types
+ class MilestoneStatsType < BaseObject
+ graphql_name 'MilestoneStats'
+ description 'Contains statistics about a milestone'
+
+ authorize :read_milestone
+
+ field :total_issues_count, GraphQL::INT_TYPE, null: true,
+ description: 'Total number of issues associated with the milestone'
+
+ field :closed_issues_count, GraphQL::INT_TYPE, null: true,
+ description: 'Number of closed issues associated with the milestone'
+ end
+end