interface GraphqlConnectionInfo
Since 0.3.0

Information about a WebSocket connection used for subscription operations.

Built from WebSocketConnectionContext and the connection_init payload. Supplied by the WS transport path; absent on the SSE/HTTP paths.

Properties

readonly
id: string

Unique connection identifier.

readonly
optional
connectionParams: Record<string, unknown>

The payload sent with connection_init, if any.

readonly
headers: Headers

The upgrade request headers.

readonly
query: Readonly<Record<string, string>>

Query string parameters from the upgrade request.

readonly
optional
protocol: string

The negotiated subprotocol, when one was selected.

readonly
data: Map<string, unknown>

Per-connection application state.

Usage

import { type GraphqlConnectionInfo } from "graphql-plugin/src/index.ts";