hasura / go-graphql-client

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

feat: added optional WithKeepAlive and WithRetryDelay #107

Closed airon-applyinnovations closed 1 year ago

airon-applyinnovations commented 1 year ago

Some servers requires the client to send ping to prevent connection from being broken due to idling. We have added WithKeepAlive which accepts time.Duration that will be use as interval for doing a continuous ping to the server. This is also implemented in npm package graphql-ws.

WithRetryDelay makes retry delay customizable. If not set it will use the default (currently hard coded 1 second).