Problem/Motivation

The current cursor implementation simply decodes a base64 value into an entity uuid. This causes a couple of issues since a critical feature of the cursor is that you can continue to paginate even if the node that you grabbed the cursor from ceases to exist (or is modified), so effectively the cursor details the "value" it's sorted by.

Steps to reproduce

Proposed resolution

The cursor needs to encode the chosen sorting configuration as well as the sorting value. The current implementation also uses the entity id as tie-breaker so this should still be implemented and stored in the cursor.

It's not a requirement that cursors keep working when the sort order changes, although the scenario should be handled gracefully (for example the Shopify API causes an internal server error).

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

kingdutch’s picture

Status: Needs review » Fixed

  • Kingdutch authored fa5b4c9 on 10.0.x
    Issue #3191632 by Kingdutch: [GraphQL] Current cursor support is not...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.