Interface: Context<P, E>
Defined in: src/server.ts:503
Type Parameters
• P extends ConnectionInitMessage
["payload"
] = ConnectionInitMessage
["payload"
]
• E = unknown
Properties
acknowledged
readonly
acknowledged:boolean
Defined in: src/server.ts:519
Indicates that the connection was acknowledged
by having dispatched the ConnectionAck
message
to the related client.
connectionInitReceived
readonly
connectionInitReceived:boolean
Defined in: src/server.ts:513
Indicates that the ConnectionInit
message
has been received by the server. If this is
true
, the client wont be kicked off after
the wait timeout has passed.
connectionParams?
readonly
optional
connectionParams:Readonly
<P
>
Defined in: src/server.ts:521
The parameters passed during the connection initialisation.
extra
extra:
E
Defined in: src/server.ts:540
An extra field where you can store your own context values to pass between callbacks.
subscriptions
readonly
subscriptions:Record
<string
,null
|AsyncGenerator
|AsyncIterable
<unknown
>>
Defined in: src/server.ts:532
Holds the active subscriptions for this context. All operations that are taking place are aggregated here. The user is subscribed to an operation when waiting for result(s).
If the subscription behind an ID is an AsyncIterator
- the operation
is streaming; on the contrary, if the subscription is null
- it is simply
a reservation, meaning - the operation resolves to a single result or is still
pending/being prepared.