avoid comments endless loop - check if query_response is always the same (#1347)

This commit is contained in:
JeremyKj87 2021-11-27 15:47:32 +01:00 committed by GitHub
parent 470fc0d905
commit 815ba83d77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,7 @@ class NodeIterator(Iterator[T]):
return item
if self._data['page_info']['has_next_page']:
query_response = self._query(self._data['page_info']['end_cursor'])
if self._data['edges'] != query_response['edges']:
page_index, data = self._page_index, self._data
try:
self._page_index = 0