Catch the highlights of GraphQLConf 2023! Click for recordings. Or check out our recap blog post.
Documentation
Classes
client.TerminatedCloseEvent

Class: TerminatedCloseEvent

client.TerminatedCloseEvent

A syntetic 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?)

Parameters

NameType
message?string

Inherited from

Error.constructor

Defined in

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

new TerminatedCloseEvent(message?, options?)

Parameters

NameType
message?string
options?ErrorOptions

Inherited from

Error.constructor

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:28

Properties

code

code: number = 4499

Defined in

src/client.ts:1082


message

message: string = '4499: Terminated'

Overrides

Error.message

Defined in

src/client.ts:1081


name

name: string = 'TerminatedCloseEvent'

Overrides

Error.name

Defined in

src/client.ts:1080


reason

reason: string = 'Terminated'

Defined in

src/client.ts:1083


wasClean

wasClean: boolean = false

Defined in

src/client.ts:1084