aws-lambda-graphql icon indicating copy to clipboard operation
aws-lambda-graphql copied to clipboard

disconnect and reconnect after 10 minutes

Open t0mpl opened this issue 4 years ago • 1 comments

Hi everyone,

first of all thanks for this awesome library, My websocket connection is reseting after 10 minutes, I've been trying to find a keep alive or ping option but can't find it. I've seen that subscriptions-transport-ws is meant to receive those keep alive messages, not to send them, so this option exists in apollo server, any idea how to achieve that?

t0mpl avatar Mar 09 '21 07:03 t0mpl

Because AWS Api Gateway has 10 minutes idle connection timeout, you need to send something yourself. I guess you can just create some query that returns a constant value and call it regularly. AWS lambda is stateless so there is no way for lambda to send you keep alive message.

michalkvasnicak avatar Mar 10 '21 10:03 michalkvasnicak