UNPKG

@nestjs/graphql

Version:

GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.

28 lines • 1.64 kB
import { ApplicationConfig, HttpAdapterHost } from '@nestjs/core'; import { GraphQLSchema } from 'graphql'; import { GraphQLFactory } from '../graphql.factory.js'; import { GqlModuleOptions, GraphQLDriver } from '../interfaces/index.js'; import { ResolverDecoratorHost } from '../services/resolver-decorator-host.js'; /** * @publicApi */ export declare abstract class AbstractGraphQLDriver<TOptions extends Record<string, any> = GqlModuleOptions> implements GraphQLDriver<TOptions> { protected readonly httpAdapterHost: HttpAdapterHost; protected readonly applicationConfig?: ApplicationConfig; protected readonly graphQlFactory: GraphQLFactory; protected readonly resolverDecoratorHost?: ResolverDecoratorHost; abstract start(options: TOptions): Promise<unknown>; abstract stop(): Promise<void>; mergeDefaultOptions(options: TOptions, defaults?: Record<string, any>): Promise<TOptions>; generateSchema(options: TOptions): Promise<GraphQLSchema> | null; /** * Wraps the `subscribe` function of a `@Subscription()` handler with its * `filter`. This is the only place the filter is applied, and the default * implementation does not apply it: a driver that serves subscriptions must * override this method. */ subscriptionWithFilter(instanceRef: unknown, filterFn: (payload: any, variables: any, context: any) => boolean | Promise<boolean>, createSubscribeContext: Function): any; protected getNormalizedPath(options: TOptions): string; protected applyGlobalPrefix(path: string, options: TOptions): string; } //# sourceMappingURL=abstract-graphql.driver.d.ts.map