Skip to main content
Version: v10.0.0

GraphqlWsExtraType

The extra of every subscription event, received by listen callbacks next to the data .


Import
import { GraphqlWsExtraType } from "@hyper-fetch/graphql"

Preview​

type GraphqlWsExtraType = {
errors?: GraphQLFormattedError[];
extensions: Record<string, unknown>;
payload: unknown;
}

Structure​

GraphqlWsExtraType
NameTypeDescription
errors
GraphQLFormattedError[]

Errors of the event. The server sends them next to the data when resolving the event failed in part - the subscription keeps running. undefined when the event has none.

A subscription the server can't execute at all, e.g. with missing variables, gets one event with these errors and

null data, and then it completes.

extensions
Record<string, unknown>

The extensions of the event, {} when the server sent none

payload
unknown

Variables of the subscription the event belongs to. Listeners of one topic with other variables are separate subscriptions, so it tells them apart where events of every subscription meet, like socket.events.onListenerEvent .