florianmari/LiveGQL

Random disconnects

Closed this issue · 4 comments

Hi, this is an awesome library and very easy to setup - congrats! Just giving it a try and connecting to an Apollo graphql server, I seem to get random disconnects - if the app is run for a minute or so I can pretty much guarantee it'll lose the connection. Is there anything I can do to avoid this do you know?

Hello @duncsand thank you for your issue, I'm gonna invest on it and fix it. I'll try on different server because I didn't have this problem. I think I'm gonna add a new parameter reconnect: (bool) to have a reconnect in case of failure!

Having investigated a bit more at my end, it seems this server has a config issue that's causing websockets to be disconnected. I hand't noticed this before because other graphql clients are doing an auto-reconnect when the session is lost - which hides the behaviour.

So, adding reconnect: (bool) would replicate what the other clients are doing and would be an awesome addition!

Thank you for your investigations I'll add the reconnect param tomorrow!

The library has been updated!