Documentation
Client
Classes
TerminatedCloseEvent

Class: TerminatedCloseEvent

Defined in: src/client.ts:1057

A synthetic close event 4499: Terminated is issued to the current to immediately close the connection without waiting for the one coming from WebSocket.onclose.

Terminating is not considered fatal and a connection retry will occur as expected.

Useful in cases where the WebSocket is stuck and not emitting any events; can happen on iOS Safari, see: https://github.com/enisdenjo/graphql-ws/discussions/290.

Extends

  • Error

Constructors

new TerminatedCloseEvent()

new TerminatedCloseEvent(message?): TerminatedCloseEvent

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082

Parameters

message?

string

Returns

TerminatedCloseEvent

Inherited from

Error.constructor

new TerminatedCloseEvent()

new TerminatedCloseEvent(message?, options?): TerminatedCloseEvent

Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082

Parameters

message?

string

options?

ErrorOptions

Returns

TerminatedCloseEvent

Inherited from

Error.constructor

Properties

code

code: number = 4499

Defined in: src/client.ts:1060


message

message: string = '4499: Terminated'

Defined in: src/client.ts:1059

Overrides

Error.message


name

name: string = 'TerminatedCloseEvent'

Defined in: src/client.ts:1058

Overrides

Error.name


reason

reason: string = 'Terminated'

Defined in: src/client.ts:1061


wasClean

wasClean: boolean = false

Defined in: src/client.ts:1062