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