UNPKG

@graphql-hive/nestjs

Version:
27 lines (24 loc) 1.19 kB
import * as graphql from 'graphql'; import { GatewayConfig, GatewayCLIBuiltinPluginConfig } from '@graphql-hive/gateway'; import { GqlModuleOptions, SubscriptionConfig, AbstractGraphQLDriver } from '@nestjs/graphql'; type HiveGatewayDriverConfig<TContext extends Record<string, any> = Record<string, any>> = GatewayConfig<TContext> & GatewayCLIBuiltinPluginConfig & Omit<GqlModuleOptions, 'schema'> & { /** * If enabled, "subscriptions-transport-ws" will be automatically registered. */ installSubscriptionHandlers?: boolean; /** * Subscriptions configuration. */ subscriptions?: SubscriptionConfig; }; declare class HiveGatewayDriver<TContext extends Record<string, any>> extends AbstractGraphQLDriver<HiveGatewayDriverConfig<TContext>> { private _gatewayRuntime; private _subscriptionService?; private ensureGatewayRuntime; start(options: HiveGatewayDriverConfig<TContext>): Promise<void>; stop(): Promise<void>; generateSchema(options: HiveGatewayDriverConfig<TContext>): Promise<graphql.GraphQLSchema>; private registerExpress; private registerFastify; } export { HiveGatewayDriver, type HiveGatewayDriverConfig };