hasura / go-graphql-client

Package graphql provides a GraphQL client implementation.
MIT License
395 stars 91 forks source link

How are subscriptions handled on reconnect? #64

Closed andig closed 1 year ago

andig commented 1 year ago

We have the problem that subscriptions are not re-established when the connection is reconnected. Looking at the code it seems if that is unexpected? Looking into this in more detail I'm wondering if we're just seeing the retry timeout expire. Is it possible to retry without limit?

utsavanand2 commented 1 year ago

@andig I'm having the same issue with the library. Have you been able to figure out a workaround? Looking at the source code setting the retry timeout to zero would not help, so setting it with a duration longer than the default of a minute might help *graphql.SubscriptionClient.WithRetryTimeout()?

hgiasac commented 1 year ago

This PR https://github.com/hasura/go-graphql-client/pull/67 improves the reconnection behavior. Please try and give feedback, thanks

andig commented 1 year ago

Thank you, we'll verify this.

andig commented 1 year ago

Thank you, confirmed working!