-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset pagination with "last N before X" should not include the item at offset X #840
Comments
I presume this is with an
|
1. Offset to be advanced back by 1 more than the count in order to exclude the item at the specified offset. 2. Count to be adjusted down if offset is too low. 3. Count to be set to 0 if offset is 0. See gh-840
I've just updated to Rather than immediately raise a new issue, I'll post the question here for clarification. Consider However, This behaviour also occurs for page sizes beyond the start of the list: This test below (Kotlin) shows a comparison with the Relay
|
I've created #873. Thanks for pointing this out @Leigh-at-Atlassian. |
Thank you @rstoyanchev 👍 |
@nilshartmann after some follow-up issues, I've realized that offset based scrolling is inclusive of the index while the Relay spec defines it to be exclusive. So I've had to make changes under #916 to adapt offsets accordingly. That means I no longer understand the cause for the issue you described here, and I will need your help with more details, if you still observe the problem after the latest changes for which a snapshot is now available. |
When executing a query with a
ScrollSubrange
that contains bothlast
andbefore
the node with thebefore
cursor is returned in the result.I think the
before
node should not be included in the result (similar tofirst X after
whereafter
is also not included in the result). Thegraphql.relay.SimpleListConnection
class also do not return thebefore
node.I tested with Spring Boot 3.2.0-M3 and used the out-of-the-box configuration (no changes to wiring etc.)
The text was updated successfully, but these errors were encountered: