diff options
Diffstat (limited to 'app/graphql/types/query_type.rb')
-rw-r--r-- | app/graphql/types/query_type.rb | 9 |
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', |