class GraphqlService
implements IGraphqlService
GraphQL service implementation.
GraphqlService(runtime: GraphqlRuntime,schema: GraphqlSchemaLike,options: { endpoint: string; documentCacheSize: number; validationRules?: unknown[]; maxDepth: number; maxNodes?: number; introspection: boolean; maskInternalErrors: boolean; formatError?: (error: unknown) => unknown; buildContext?: (input: GraphqlContextInput) => unknown | Promise<unknown>; rootValue?: unknown; logger?: GraphqlLogger; serviceRegistry: IServiceRegistry; })
readonly
cachedDocumentCount: number
Report the number of cached documents.
readonly
endpoint: string
The endpoint path where GraphQL is served.
clearCache(): void
Clear the document cache.
execute(): Promise<GraphqlExecutionOutcome>
Execute a GraphQL request.
Since 0.3.0
subscribe(params: GraphqlRequestParams,context?: GraphqlOperationContext): 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.