function encodeSseEvent
encodeSseEvent(data: unknown): Uint8Array

Encode a next SSE event carrying a GraphQL execution result.

Parameters

data: unknown

The execution result to serialize

Return Type

The encoded SSE event bytes

Usage

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