Skip to content

Commit fd3e506

Browse files
committed
add check of cursor back
1 parent cec7151 commit fd3e506

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
@@ -943,6 +943,12 @@ def parse_result(
943943
change_cursor = False
944944

945945
if change_cursor and self._need_query:
946+
if new_cursor == self._cursor:
947+
raise GraphQlQueryError(
948+
"Cursor didn't change during pagination."
949+
" This can cause infinite loop."
950+
)
951+
946952
for child in self._children_iter():
947953
child.reset_cursor()
948954
self._cursor = new_cursor

0 commit comments

Comments
 (0)