2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class IssuesResolver < BaseResolver
|
2019-05-30 16:15:17 +05:30
|
|
|
extend ActiveSupport::Concern
|
2019-02-15 15:39:39 +05:30
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
argument :iids, [GraphQL::ID_TYPE],
|
|
|
|
required: false,
|
|
|
|
description: 'The list of IIDs of issues, e.g., [1, 2]'
|
2019-05-30 16:15:17 +05:30
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
argument :search, GraphQL::STRING_TYPE,
|
|
|
|
required: false
|
|
|
|
argument :sort, Types::Sort,
|
|
|
|
required: false,
|
|
|
|
default_value: 'created_desc'
|
|
|
|
|
|
|
|
type Types::IssueType, null: true
|
|
|
|
|
|
|
|
alias_method :project, :object
|
|
|
|
|
|
|
|
def resolve(**args)
|
|
|
|
# Will need to be be made group & namespace aware with
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab-ce/issues/54520
|
|
|
|
args[:project_id] = project.id
|
|
|
|
|
|
|
|
IssuesFinder.new(context[:current_user], args).execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|