2020-05-21 20:08:07 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class MergeRequestResolver < BaseResolver.single
|
|
|
|
include ResolvesMergeRequests
|
|
|
|
|
|
|
|
alias_method :project, :synchronized_object
|
|
|
|
|
2020-11-17 07:09:15 -05:00
|
|
|
type ::Types::MergeRequestType, null: true
|
|
|
|
|
2020-05-21 20:08:07 -04:00
|
|
|
argument :iid, GraphQL::STRING_TYPE,
|
|
|
|
required: true,
|
|
|
|
as: :iids,
|
2021-01-11 19:10:42 -05:00
|
|
|
description: 'IID of the merge request, for example `1`.'
|
2020-05-21 20:08:07 -04:00
|
|
|
|
|
|
|
def no_results_possible?(args)
|
|
|
|
project.nil?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|