fix(graphql websocket): keep alive websocket connections if idle (#2720)

- if no data is being sent on a websocket connection then it was closed by nginx after 60s
- it is assumed to be better to keep alive the connection than have the overhead of closing and re-establishing the connection every 60s
This commit is contained in:
Iain Sproat
2024-08-21 13:54:00 +01:00
committed by GitHub
parent 63735eb044
commit 93b970dc07
+2 -1
View File
@@ -230,7 +230,8 @@ function buildApolloSubscriptionServer(
}
return baseParams
}
},
keepAlive: 30000 //milliseconds. Loadbalancers may close the connection after inactivity. e.g. nginx default is 60000ms.
},
{
server,