2020-08-07 12:09:59 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class BoardListIssuesResolver < BaseResolver
|
2020-09-03 12:08:47 +00:00
|
|
|
include BoardIssueFilterable
|
|
|
|
|
|
|
|
argument :filters, Types::Boards::BoardIssueInputType,
|
|
|
|
required: false,
|
|
|
|
description: 'Filters applied when selecting issues in the board list'
|
|
|
|
|
2020-08-07 12:09:59 +00:00
|
|
|
type Types::IssueType, null: true
|
|
|
|
|
|
|
|
alias_method :list, :object
|
|
|
|
|
|
|
|
def resolve(**args)
|
2020-09-03 12:08:47 +00:00
|
|
|
filter_params = issue_filters(args[:filters]).merge(board_id: list.board.id, id: list.id)
|
|
|
|
service = Boards::Issues::ListService.new(list.board.resource_parent, context[:current_user], filter_params)
|
|
|
|
|
2020-08-07 12:09:59 +00:00
|
|
|
Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection.new(service.execute)
|
|
|
|
end
|
2020-08-12 06:09:53 +00:00
|
|
|
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/235681
|
|
|
|
def self.complexity_multiplier(args)
|
|
|
|
0.005
|
|
|
|
end
|
2020-08-07 12:09:59 +00:00
|
|
|
end
|
|
|
|
end
|