Did you guys run into any considerations for dropp...
# apollo-kotlin
f
Did you guys run into any considerations for dropped connection and recovering from errors when doing sus over websockets? Specially but not limited to handover from mobile to wifi ?
m
You can either call
retry{}
on each subscrition
Flow
. Or if you want to do things globally, there's a
reconnectWhen
option that will ignore errors and retry silently
f
any insights into how to cause such disruptions while writing tests for SSE? if there's anything written for websockets it would be nice having a look.
m
Testing Websockets is not easy (see also https://github.com/apollographql/apollo-kotlin/issues/3259)
The repo has some code to simulate early closures from a WebSocket but it's all very hackish and uses a full-fledged server so I wouldn't really recommend that
1