Skip to main content
Version: v10.0.0

GraphqlWsKeepAliveOptionsType

Keep-alive of the connection. The client sends ping when the connection is quiet and treats it as lost when the

pong does not arrive in time - the only way to notice a connection that died without a close, e.g. behind a proxy.


Import
import { GraphqlWsKeepAliveOptionsType } from "@hyper-fetch/graphql"

Preview​

type GraphqlWsKeepAliveOptionsType = {
enabled: boolean;
intervalMs?: number;
pongTimeoutMs?: number;
}

Structure​

GraphqlWsKeepAliveOptionsType
NameTypeDescription
enabled
boolean
intervalMs
number

How long the connection can be quiet before the client sends ping , in milliseconds.

pongTimeoutMs
number

How long the client waits for pong before it reconnects, in milliseconds.