2020-05-22 00:08:07 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class MergeRequestResolver < BaseResolver.single
|
|
|
|
include ResolvesMergeRequests
|
|
|
|
|
2021-03-18 06:11:52 +00:00
|
|
|
alias_method :project, :object
|
2020-05-22 00:08:07 +00:00
|
|
|
|
2020-11-17 12:09:15 +00:00
|
|
|
type ::Types::MergeRequestType, null: true
|
|
|
|
|
2020-05-22 00:08:07 +00:00
|
|
|
argument :iid, GraphQL::STRING_TYPE,
|
2021-03-24 03:09:04 +00:00
|
|
|
required: true,
|
|
|
|
as: :iids,
|
|
|
|
description: 'IID of the merge request, for example `1`.'
|
2020-05-22 00:08:07 +00:00
|
|
|
|
|
|
|
def no_results_possible?(args)
|
|
|
|
project.nil?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|