You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation on subscriptions https://ariadnegraphql.org/docs/subscriptions.html only has an example for an async generator that terminates after a few iterations. In practice it's normal to have subscriptions that keep going indefinitely.
I've found that the following pattern:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The documentation on subscriptions https://ariadnegraphql.org/docs/subscriptions.html only has an example for an async generator that terminates after a few iterations. In practice it's normal to have subscriptions that keep going indefinitely.
I've found that the following pattern:
Works for the most part, but sometimes I get a
CancelledError
escaping to the top level. Re raising (as I do here) seems to be necessary.Is there a way that I can deal with the stray escaping exceptions whilst still being able to terminate the generator?
Beta Was this translation helpful? Give feedback.
All reactions