method GraphqlService.prototype.subscribe
Since 0.3.0
GraphqlService.prototype.subscribe(): Promise<GraphqlSubscriptionOutcome>

Subscribe to a GraphQL operation (query, mutation, or subscription).

Accepts every operation kind and returns the matching discriminated outcome. The transports narrow on the kind field to emit conformant frames.

Parameters

The parsed GraphQL request parameters

optional
context: GraphqlOperationContext

Optional operation context (request or connection)

Return Type

The discriminated subscription outcome

Usage

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