Skip to content

Commit

Permalink
Make sure tasks are always added
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Aug 10, 2024
1 parent e1a72ff commit 76e45ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/graphql/execution/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ async def await_data() -> None:
incremental_data_record, data
)

self.add_task(await_data()) # type: ignore
self.add_task(await_data())

else:
incremental_publisher.complete_deferred_fragment_record(
Expand Down Expand Up @@ -1562,7 +1562,7 @@ async def await_completed_awaitable_item() -> None:
incremental_data_record, [value]
)

self.add_task(await_completed_awaitable_item()) # type: ignore
self.add_task(await_completed_awaitable_item())
return incremental_data_record

try:
Expand Down Expand Up @@ -1622,6 +1622,7 @@ async def await_completed_item() -> None:
incremental_data_record, [value]
)

self.add_task(await_completed_item())
return incremental_data_record

incremental_publisher.complete_stream_items_record(
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/execution/incremental_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def filter(
except AttributeError:
pass
else:
self._add_task(close_async_iterator) # type: ignore
self._add_task(close_async_iterator)

def _trigger(self) -> None:
self._resolve.set()
Expand Down

0 comments on commit 76e45ac

Please sign in to comment.