Documentation
Classes
client.TerminatedCloseEvent

Class: TerminatedCloseEvent

client.TerminatedCloseEvent

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.

Hierarchy

  • Error

    TerminatedCloseEvent

Constructors

constructor

new TerminatedCloseEvent(message?): TerminatedCloseEvent

Parameters

NameType
message?string

Returns

TerminatedCloseEvent

Inherited from

Error.constructor

Defined in

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

new TerminatedCloseEvent(message?, options?): TerminatedCloseEvent

Parameters

NameType
message?string
options?ErrorOptions

Returns

TerminatedCloseEvent

Inherited from

Error.constructor

Defined in

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

Properties

code

code: number = 4499

Defined in

src/client.ts:1076


message

message: string = '4499: Terminated'

Overrides

Error.message

Defined in

src/client.ts:1075


name

name: string = 'TerminatedCloseEvent'

Overrides

Error.name

Defined in

src/client.ts:1074


reason

reason: string = 'Terminated'

Defined in

src/client.ts:1077


wasClean

wasClean: boolean = false

Defined in

src/client.ts:1078