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/query_type.rb')
-rw-r--r--app/graphql/types/query_type.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/graphql/types/query_type.rb b/app/graphql/types/query_type.rb
index b4cbd96bfdb..c04f4da70cf 100644
--- a/app/graphql/types/query_type.rb
+++ b/app/graphql/types/query_type.rb
@@ -47,6 +47,15 @@ module Types
null: false,
description: 'Fields related to design management'
+ field :milestone, ::Types::MilestoneType,
+ null: true,
+ description: 'Find a milestone',
+ resolve: -> (_obj, args, _ctx) { GitlabSchema.find_by_gid(args[:id]) } do
+ argument :id, ::Types::GlobalIDType[Milestone],
+ required: true,
+ description: 'Find a milestone by its ID'
+ end
+
field :user, Types::UserType,
null: true,
description: 'Find a user',