Calling a service with complex ordering with GraphQL keyset pagination
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Keyset pagination has a limit of 2 orderings, which is easily exceeded when our Boards::Issues::ListService
has two and the ID sorting is added on top of that - an error occurs.
We have some options to deal with this:
- Use keyset pagination, but apply the sorting in the service. Instead of using
reorder
on theBoardListIssuesResolver
, let the service handle it (pass in akeyset_ordering
param, for example). - Wrap the service execution in
Gitlab::Graphql::Pagination::OffsetActiveRecordRelationConnection
to use offset pagination instead - something else?
The following discussion from !36259 (merged) should be addressed:
-
@smcgivern started a discussion: (+1 comment) I'd still like to move this to the service as an extra param (
keyset_ordering
or something?). But we can do that later.
A solution that did not work: 425c765f
Edited by 🤖 GitLab Bot 🤖