davidyaha/graphql-redis-subscriptions

Subscription not working after some time due to browser inactivity even though it seems to be connected

pkshaky90 opened this issue · 2 comments

Subscription stops working after some time due to browser inactivity or some other issue.

For Apollo Server@^2.0, you can pass a keepAlive setting, for prevent connection being killed by proxy:

const server = new ApolloServer({
  subscriptions: {
    keepAlive: 20 * 1000 // 20 seconds
  }
});

I don't think this is strictily a graphql-redis-subscriptions issue. The WS connection is being handled by apollo server and client.
Happy to re-open if that issue persists.