Skip to content

Commit 2cdf288

Browse files
authored
Merge pull request #329 from ynput/bugfix/graphql_fix_truncation_over_300
Fix nested edges pagination
2 parents d2201cf + ed18e45 commit 2cdf288

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ayon_api/graphql.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,12 @@ def get_filters(self) -> dict[str, Any]:
959959
if total > self._limit:
960960
limit_amount = self._limit - self._fetched_counter
961961

962+
if self.child_has_edges:
963+
# Nested edge fields share a single cursor argument in the query.
964+
# Query one parent item at a time so child pagination can't be
965+
# overwritten by another parent from the same outer page.
966+
limit_amount = 1
967+
962968
filters[limit_key] = limit_amount
963969

964970
if self._cursor:

0 commit comments

Comments
 (0)