2020-05-21 20:08:07 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class MergeRequestResolver < BaseResolver.single
|
|
|
|
include ResolvesMergeRequests
|
|
|
|
|
2021-03-18 02:11:52 -04:00
|
|
|
alias_method :project, :object
|
2020-05-21 20:08:07 -04:00
|
|
|
|
2020-11-17 07:09:15 -05:00
|
|
|
type ::Types::MergeRequestType, null: true
|
|
|
|
|
2021-07-22 08:10:04 -04:00
|
|
|
argument :iid, GraphQL::Types::String,
|
2021-03-23 23:09:04 -04:00
|
|
|
required: true,
|
|
|
|
as: :iids,
|
|
|
|
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
|