0xPlaygrounds / 0xPlaygrounds/subgrounds

Incorrect Pagination leading to missing results

Offen
#11 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug need-validation
Vorherrschende Sprache
Python
Sterne
73
Forks
12
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**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](https://github.com/roama3)*

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

The issue describes a pagination bug in a GraphQL client library when querying subgraphs with non-unique ordering fields like timestamp. Look at the pagination logic in the codebase, likely in query building or result handling modules. Understand how the library determines the ordering field and how it constructs skip/first parameters and timestamp_gt filters. Test with a subgraph returning >1800 entities to reproduce the missing results.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
graphql, python
Bereich
api, backend, data
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.