Skip to content
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

Incorrect Pagination leading to missing results #11

Open
0xMochan opened this issue Mar 3, 2023 · 0 comments
Open

Incorrect Pagination leading to missing results #11

0xMochan opened this issue Mar 3, 2023 · 0 comments
Labels
bug Something isn't working need-validation Maintainer needs to validate bug

Comments

@0xMochan
Copy link
Collaborator

0xMochan commented Mar 3, 2023

Describe the bug
Missing data due to Incorrect pagination.

To Reproduce
Steps to reproduce the behavior:

  • Query any subgraph which has e.g. a timestamp and should return > 1800 entities.
  • After the first pagination, instead of using "skip: 1800" and "first: 900"
    • in my case it uses "skip: 0", "first: 900" and "timestamp_gt: $lastOrderingValue0".
  • If the timestamp of result with index 1800 is the same as 1801, this will skip 1801 and any other events which happen to have the same timestamp as index 1800.

Expected behavior
Results with same timestamp as the last returned timestamp from the previous result set of the pagination are present.

Sorry I'm not experienced enough with the library to understand how it determines over which field to paginate - a briefer summary is that pagination shouldn't occur over fields which are not guaranteed to be unique.

Originally from: roama3

@0xMochan 0xMochan added bug Something isn't working need-validation Maintainer needs to validate bug labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need-validation Maintainer needs to validate bug
Projects
None yet
Development

No branches or pull requests

1 participant