spring-projects / spring-graphql

Spring Integration for GraphQL
https://spring.io/projects/spring-graphql
Apache License 2.0
1.5k stars 297 forks source link

Adapt offset scroll calculations to changes in Spring Data 2024.0 #946

Closed rstoyanchev closed 3 months ago

rstoyanchev commented 3 months ago

Spring Data 2024.0 will align offset with keyset scroll positions in https://github.com/spring-projects/spring-data-commons/issues/3070 such that an offset position corresponds to the element index (i.e. no longer adding +1), and also for data store implementations to exclude rather than include the reference offset position.

This will require follow-up adjustments on our end. For forward pagination we no longer need to advance by 1. For backward pagination, we need to advance back by (count + 1) so the results exclude the reference position.