GraphQLWebSocketClientOptions
@iota/graphql-transport / GraphQLWebSocketClientOptions
Type Alias: GraphQLWebSocketClientOptions
GraphQLWebSocketClientOptions =
object
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:84
Configuration options for the GraphQL WebSocket client.
Properties
connectionAckTimeout?
optionalconnectionAckTimeout?:number
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:99
Milliseconds to wait for the connection_ack message before timing out.
Default
30000
connectionParams?
optionalconnectionParams?:Record<string,unknown>
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:94
Optional payload to send with the connection_init message.
Can be used for authentication tokens or other connection-level metadata.
maxReconnects?
optionalmaxReconnects?:number
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:109
Maximum number of reconnection attempts before giving up.
Default
5
reconnectTimeout?
optionalreconnectTimeout?:number
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:104
Milliseconds between reconnection attempts.
Default
3000
startupErrorGrace?
optionalstartupErrorGrace?:number
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:116
Milliseconds to wait for the server to refuse the operation. graphql-ws does not
acknowledge a subscribe, so an error frame is the only signal. Inside this window it
rejects subscribe(), after it it goes to onError. Messages arrive throughout.
Default
250
WebSocketConstructor?
optionalWebSocketConstructor?: typeofWebSocket
Defined in: sdk/graphql-transport/src/graphql-websocket-client.ts:89
Custom WebSocket class to use. Defaults to the global WebSocket class, if available.