Commit 0e825e45 authored by charlie ablett's avatar charlie ablett

Use Offset rather than Keyset pagination

parent cc1dcae0
......@@ -9,7 +9,7 @@ module Resolvers
def resolve(**args)
# rubocop: disable CodeReuse/ActiveRecord
service = Boards::Issues::ListService.new(list.board.resource_parent, context[:current_user], { board_id: list.board.id, id: list.id })
service.execute.reorder("issues.relative_position ASC").order("issues.id DESC")
Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection.new(service.execute)
# rubocop: enable CodeReuse/ActiveRecord
end
end
......
......@@ -7,7 +7,7 @@ module Types
description: 'Total count of collection'
def count
relation = object.items
relation = object.items.reorder(nil)
if relation.try(:group_values)&.present?
relation.size.keys.size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment