@nestjs/graphql

  • Version 14.2.2
  • Published
  • 2.18 MB
  • 12 dependencies
  • MIT license

Install

npm i @nestjs/graphql
yarn add @nestjs/graphql
pnpm add @nestjs/graphql

Overview

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

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable ARGS_TYPE_METADATA

const ARGS_TYPE_METADATA: string;

    variable CLASS_TYPE_METADATA

    const CLASS_TYPE_METADATA: string;

      variable CONTEXT

      const CONTEXT: string;

        variable DEFINITIONS_FILE_HEADER

        const DEFINITIONS_FILE_HEADER: string;

          variable FIELD_MIDDLEWARE_METADATA

          const FIELD_MIDDLEWARE_METADATA: string;

            variable FIELD_RESOLVER_COMPOSITION_METADATA

            const FIELD_RESOLVER_COMPOSITION_METADATA: string;

              variable FIELD_RESOLVER_MIDDLEWARE_METADATA

              const FIELD_RESOLVER_MIDDLEWARE_METADATA: string;

                variable FIELD_TYPENAME

                const FIELD_TYPENAME: string;

                  variable Float

                  const Float: any;

                    variable GRAPHQL_MODULE_ID

                    const GRAPHQL_MODULE_ID: string;

                      variable GRAPHQL_MODULE_OPTIONS

                      const GRAPHQL_MODULE_OPTIONS: string;

                        variable GRAPHQL_SDL_FILE_END

                        const GRAPHQL_SDL_FILE_END: string;

                          variable GRAPHQL_SDL_FILE_HEADER

                          const GRAPHQL_SDL_FILE_HEADER: string;

                            variable GraphQLISODateTime

                            const GraphQLISODateTime: GraphQLScalarType<Date, string>;

                              variable GraphQLTimestamp

                              const GraphQLTimestamp: GraphQLScalarType<Date, number>;

                                variable HIDE_FIELD_METADATA

                                const HIDE_FIELD_METADATA: string;

                                  variable ID

                                  const ID: any;

                                    variable Int

                                    const Int: any;

                                      variable PARAM_ARGS_METADATA

                                      const PARAM_ARGS_METADATA: string;

                                        variable RESOLVER_DELEGATE_METADATA

                                        const RESOLVER_DELEGATE_METADATA: string;

                                          variable RESOLVER_NAME_METADATA

                                          const RESOLVER_NAME_METADATA: string;

                                            variable RESOLVER_PROPERTY_METADATA

                                            const RESOLVER_PROPERTY_METADATA: string;

                                              variable RESOLVER_REFERENCE_KEY

                                              const RESOLVER_REFERENCE_KEY: string;

                                                variable RESOLVER_REFERENCE_METADATA

                                                const RESOLVER_REFERENCE_METADATA: string;

                                                  variable RESOLVER_TYPE_METADATA

                                                  const RESOLVER_TYPE_METADATA: string;

                                                    variable SCALAR_NAME_METADATA

                                                    const SCALAR_NAME_METADATA: string;

                                                      variable SCALAR_TYPE_METADATA

                                                      const SCALAR_TYPE_METADATA: string;

                                                        variable SUBSCRIPTION_OPTIONS_METADATA

                                                        const SUBSCRIPTION_OPTIONS_METADATA: string;

                                                          variable SUBSCRIPTION_TYPE

                                                          const SUBSCRIPTION_TYPE: string;

                                                            variable TypeMetadataStorage

                                                            const TypeMetadataStorage: TypeMetadataStorageHost;

                                                              Functions

                                                              function addFieldMetadata

                                                              addFieldMetadata: <T extends unknown>(
                                                              typeOrOptions: ReturnTypeFunc<T> | FieldOptionsExtractor<T>,
                                                              fieldOptions: FieldOptionsExtractor<T>,
                                                              prototype: object,
                                                              propertyKey?: string,
                                                              descriptor?: TypedPropertyDescriptor<any>,
                                                              loadEagerly?: boolean
                                                              ) => void;

                                                                function Args

                                                                Args: {
                                                                (): ParameterDecorator;
                                                                (...pipes: any[]): ParameterDecorator;
                                                                (property: string, ...pipes: any[]): ParameterDecorator;
                                                                (options: ArgsOptions<any>, ...pipes: any[]): ParameterDecorator;
                                                                (
                                                                property: string,
                                                                options: ArgsOptions<any>,
                                                                ...pipes: any[]
                                                                ): ParameterDecorator;
                                                                };
                                                                • Resolver method parameter decorator. Extracts the arguments object from the underlying platform and populates the decorated parameter with the value of either all arguments or a single specified argument.

                                                                function ArgsType

                                                                ArgsType: {
                                                                (): ClassDecorator;
                                                                (options: ArgsTypeOptions): ClassDecorator;
                                                                (name: string, options?: ArgsTypeOptions): ClassDecorator;
                                                                };
                                                                • Decorator that marks a class as a resolver arguments type.

                                                                • Decorator that marks a class as a resolver arguments type.

                                                                  Note: arguments classes are flattened into the individual arguments of every field they are used in, so the explicit name is only reflected in the type metadata and does not appear in the generated schema.

                                                                function Context

                                                                Context: {
                                                                (): ParameterDecorator;
                                                                (...pipes: any[]): ParameterDecorator;
                                                                (property: string, ...pipes: any[]): ParameterDecorator;
                                                                };
                                                                • Resolver method parameter decorator. Extracts the Context object from the underlying platform and populates the decorated parameter with the value of Context.

                                                                function createUnionType

                                                                createUnionType: <T extends readonly Type<unknown>[] = Type<unknown>[]>(
                                                                options: UnionOptions<T>
                                                                ) => Union<T>;
                                                                • Creates a GraphQL union type composed of types references.

                                                                  Parameter options

                                                                function Directive

                                                                Directive: (
                                                                sdl: string | string[]
                                                                ) => MethodDecorator & PropertyDecorator & ClassDecorator;
                                                                • Adds one or more directives to a field, type, or handler. Passing an array attaches every directive in a single decorator call, equivalent to stacking multiple @Directive(...) decorators.

                                                                function extend

                                                                extend: (obj1: unknown, obj2: unknown) => any;
                                                                • Concatenates type definitions (strings) and arrays; merges any other two values as objects, one level deep.

                                                                  Note: a type present in both of two resolver maps keeps only the resolvers of the second one. Use "mergeResolvers" (from "@graphql-tools/merge") to merge resolver maps field by field.

                                                                function Extensions

                                                                Extensions: (
                                                                value: Record<string, unknown>
                                                                ) => MethodDecorator & ClassDecorator & PropertyDecorator;
                                                                • Adds arbitrary data accessible through the "extensions" property to specified field, type, or handler.

                                                                function Field

                                                                Field: {
                                                                (): PropertyDecorator & MethodDecorator;
                                                                <T extends unknown>(options: FieldOptionsExtractor<T>): PropertyDecorator &
                                                                MethodDecorator;
                                                                <T extends unknown>(
                                                                returnTypeFunction?: ReturnTypeFunc<T>,
                                                                options?: FieldOptionsExtractor<T>
                                                                ): PropertyDecorator & MethodDecorator;
                                                                };
                                                                • @Field() decorator is used to mark a specific class property as a GraphQL field. Only properties decorated with this decorator will be defined in the schema.

                                                                function getFieldsAndDecoratorForType

                                                                getFieldsAndDecoratorForType: <T>(
                                                                objType: Type<T>,
                                                                options?: { overrideFields?: boolean; decorator?: ClassDecoratorFactory }
                                                                ) => {
                                                                fields: import('../metadata/property.metadata.js').PropertyMetadata[];
                                                                decoratorFactory: ClassDecorator;
                                                                };
                                                                • Returns the compiled field metadata of a class decorated with @ObjectType(), @InputType(), @InterfaceType() or @ArgsType() (inherited fields included), together with the class decorator that matches its kind.

                                                                  This is the building block of the mapped type helpers (PartialType(), PickType(), etc.) and can be used to write custom ones. The returned metadata objects are shared with the schema builder, so treat them as read-only.

                                                                  Parameter objType

                                                                  the GraphQL type class

                                                                  Parameter

                                                                  options.overrideFields recompile the field metadata of the class instead of reusing the cached list (the built-in helpers pass it when the plugin metadata is refreshed). Usually omitted.

                                                                  Parameter

                                                                  options.decorator the class decorator of the type the fields are collected for. A class registered as that kind of type too (e.g., decorated with both @ObjectType() and @InputType()) is read as that kind.

                                                                  Throws

                                                                  {UnableToFindFieldsError} if the class is not a GraphQL type.

                                                                function HideField

                                                                HideField: () => PropertyDecorator;
                                                                • Excludes the property from the schema generated with the CLI plugin.

                                                                  The plugin skips members decorated with @HideField() when it can tell from the source. The decorator also marks the member at runtime, so that it stays hidden when it is applied through applyDecorators() or another composed decorator the plugin cannot see through.

                                                                function Info

                                                                Info: (...pipes: (Type<PipeTransform> | PipeTransform)[]) => ParameterDecorator;
                                                                • Resolver method parameter decorator. Extracts the Info object from the underlying platform and populates the decorated parameter with the value of Info.

                                                                function InputType

                                                                InputType: {
                                                                (): ClassDecorator;
                                                                (options: InputTypeOptions): ClassDecorator;
                                                                (name: string, options?: InputTypeOptions): ClassDecorator;
                                                                };
                                                                • Decorator that marks a class as a GraphQL input type.

                                                                function InterfaceType

                                                                InterfaceType: {
                                                                (options?: InterfaceTypeOptions): ClassDecorator;
                                                                (name: string, options?: InterfaceTypeOptions): ClassDecorator;
                                                                };
                                                                • Decorator that marks a class as a GraphQL interface type.

                                                                function IntersectionType

                                                                IntersectionType: <A, B>(
                                                                classARef: Type<A>,
                                                                classBRef: Type<B>,
                                                                decorator?: ClassDecoratorFactory
                                                                ) => Type<A & B>;

                                                                  function Mutation

                                                                  Mutation: {
                                                                  (): MethodDecorator;
                                                                  (name: string): MethodDecorator;
                                                                  (typeFunc: ReturnTypeFunc<any>, options?: MutationOptions<any>): MethodDecorator;
                                                                  };
                                                                  • Mutation handler (method) Decorator. Routes specified mutation to this method.

                                                                  function ObjectType

                                                                  ObjectType: {
                                                                  (): ClassDecorator;
                                                                  (options: ObjectTypeOptions): ClassDecorator;
                                                                  (name: string, options?: ObjectTypeOptions): ClassDecorator;
                                                                  };
                                                                  • Decorator that marks a class as a GraphQL type.

                                                                  function OmitType

                                                                  OmitType: <T, K extends keyof T>(
                                                                  classRef: Type<T>,
                                                                  keys: readonly K[],
                                                                  decorator?: ClassDecoratorFactory
                                                                  ) => Type<Omit<T, K>>;

                                                                    function Parent

                                                                    Parent: () => ParameterDecorator;
                                                                    • Resolver method parameter decorator. Extracts the parent/root object from the underlying platform and populates the decorated parameter with the value of parent/root.

                                                                    function PartialType

                                                                    PartialType: <T>(
                                                                    classRef: Type<T>,
                                                                    optionsOrDecorator?: ClassDecoratorFactory | PartialTypeOptions
                                                                    ) => Type<Partial<T>>;

                                                                      function PickType

                                                                      PickType: <T, K extends keyof T>(
                                                                      classRef: Type<T>,
                                                                      keys: readonly K[],
                                                                      decorator?: ClassDecoratorFactory
                                                                      ) => Type<Pick<T, K>>;

                                                                        function Query

                                                                        Query: {
                                                                        (): MethodDecorator;
                                                                        (name: string): MethodDecorator;
                                                                        (typeFunc: ReturnTypeFunc<any>, options?: QueryOptions<any>): MethodDecorator;
                                                                        };
                                                                        • Query handler (method) Decorator. Routes specified query to this method.

                                                                        function registerEnumType

                                                                        registerEnumType: <T extends object = any>(
                                                                        enumRef: T,
                                                                        options?: EnumOptions<T>
                                                                        ) => void;
                                                                        • Registers a GraphqQL enum type based on the passed enumerator reference.

                                                                          Parameter options

                                                                        function ResolveField

                                                                        ResolveField: {
                                                                        (options?: ResolveFieldOptions): MethodDecorator;
                                                                        (
                                                                        typeFunc?: ReturnTypeFunc<any>,
                                                                        options?: ResolveFieldOptions<any>
                                                                        ): MethodDecorator;
                                                                        (propertyName?: string, options?: ResolveFieldOptions<any>): MethodDecorator;
                                                                        (
                                                                        propertyName?: string,
                                                                        typeFunc?: ReturnTypeFunc<any>,
                                                                        options?: ResolveFieldOptions<any>
                                                                        ): MethodDecorator;
                                                                        };
                                                                        • Field resolver (method) Decorator.

                                                                        • Property resolver (method) Decorator.

                                                                        function ResolveProperty

                                                                        ResolveProperty: {
                                                                        (typeFunc?: ReturnTypeFunc, options?: ResolveFieldOptions): MethodDecorator;
                                                                        (
                                                                        propertyName?: string,
                                                                        typeFunc?: ReturnTypeFunc<any>,
                                                                        options?: ResolveFieldOptions<any>
                                                                        ): MethodDecorator;
                                                                        };
                                                                        • Property resolver (method) Decorator.

                                                                        function Resolver

                                                                        Resolver: {
                                                                        (): MethodDecorator & ClassDecorator;
                                                                        (name: string): MethodDecorator & ClassDecorator;
                                                                        (options: ResolverOptions): MethodDecorator & ClassDecorator;
                                                                        (classType: Function, options?: ResolverOptions): MethodDecorator &
                                                                        ClassDecorator;
                                                                        (typeFunc: ResolverTypeFn, options?: ResolverOptions): MethodDecorator &
                                                                        ClassDecorator;
                                                                        };
                                                                        • Object resolver decorator.

                                                                        function ResolveReference

                                                                        ResolveReference: () => MethodDecorator;
                                                                        • Property reference resolver (method) Decorator.

                                                                        function Root

                                                                        Root: () => ParameterDecorator;
                                                                        • Resolver method parameter decorator. Extracts the parent/root object from the underlying platform and populates the decorated parameter with the value of parent/root.

                                                                        function Scalar

                                                                        Scalar: {
                                                                        (name: string): ClassDecorator;
                                                                        (name: string, typeFunc: ReturnTypeFunc<any>): ClassDecorator;
                                                                        };
                                                                        • Decorator that marks a class as a GraphQL scalar.

                                                                        function Subscription

                                                                        Subscription: {
                                                                        (): MethodDecorator;
                                                                        (name: string): MethodDecorator;
                                                                        (
                                                                        name: string,
                                                                        options: Pick<SubscriptionOptions<any>, 'filter' | 'resolve'>
                                                                        ): MethodDecorator;
                                                                        (
                                                                        typeFunc: ReturnTypeFunc<any>,
                                                                        options?: SubscriptionOptions<any>
                                                                        ): MethodDecorator;
                                                                        };
                                                                        • Subscription handler (method) Decorator. Routes subscriptions to this method.

                                                                        function transformSchema

                                                                        transformSchema: (
                                                                        schema: GraphQLSchema,
                                                                        transformType: TypeTransformer
                                                                        ) => GraphQLSchema;

                                                                          function UseFieldMiddleware

                                                                          UseFieldMiddleware: (
                                                                          ...middleware: FieldMiddleware[]
                                                                          ) => PropertyDecorator & MethodDecorator;
                                                                          • Applies field middleware to a field (@Field()) or a field resolver (@ResolveField()). It can be placed above or below either decorator, and composes well with applyDecorators().

                                                                            Middleware runs in this order: 1. global middleware (buildSchemaOptions.fieldMiddleware), 2. middleware passed through the middleware option of @Field() or @ResolveField(), 3. middleware applied with @UseFieldMiddleware(), in the order given.

                                                                            When the decorator is stacked, the middleware of the lowest one runs first (as with @UseGuards()). A subclass that decorates an inherited member extends the inherited list. For field resolvers, field middleware runs before the enhancers enabled through fieldResolverEnhancers (guards, interceptors, filters).

                                                                            Parameter middleware

                                                                            one or more field middleware functions

                                                                            See Also

                                                                            • [Field middleware](https://docs.nestjs.com/graphql/field-middleware)

                                                                          Classes

                                                                          class AbstractGraphQLDriver

                                                                          abstract class AbstractGraphQLDriver<
                                                                          TOptions extends Record<string, any> = GqlModuleOptions
                                                                          > implements GraphQLDriver<TOptions> {}

                                                                          property applicationConfig

                                                                          protected readonly applicationConfig?: ApplicationConfig;

                                                                            property graphQlFactory

                                                                            protected readonly graphQlFactory: GraphQLFactory;

                                                                              property httpAdapterHost

                                                                              protected readonly httpAdapterHost: HttpAdapterHost;

                                                                                property resolverDecoratorHost

                                                                                protected readonly resolverDecoratorHost?: ResolverDecoratorHost;

                                                                                  method applyGlobalPrefix

                                                                                  protected applyGlobalPrefix: (path: string, options: TOptions) => string;

                                                                                    method generateSchema

                                                                                    generateSchema: (options: TOptions) => Promise<GraphQLSchema> | null;

                                                                                      method getNormalizedPath

                                                                                      protected getNormalizedPath: (options: TOptions) => string;

                                                                                        method mergeDefaultOptions

                                                                                        mergeDefaultOptions: (
                                                                                        options: TOptions,
                                                                                        defaults?: Record<string, any>
                                                                                        ) => Promise<TOptions>;

                                                                                          method start

                                                                                          abstract start: (options: TOptions) => Promise<unknown>;

                                                                                            method stop

                                                                                            abstract stop: () => Promise<void>;

                                                                                              method subscriptionWithFilter

                                                                                              subscriptionWithFilter: (
                                                                                              instanceRef: unknown,
                                                                                              filterFn: (
                                                                                              payload: any,
                                                                                              variables: any,
                                                                                              context: any
                                                                                              ) => boolean | Promise<boolean>,
                                                                                              createSubscribeContext: Function
                                                                                              ) => any;
                                                                                              • 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.

                                                                                              class BaseExplorerService

                                                                                              class BaseExplorerService {}

                                                                                                method flatMap

                                                                                                flatMap: <T = ResolverMetadata>(
                                                                                                modules: Module[],
                                                                                                callback: (instance: InstanceWrapper, moduleRef: Module) => T | T[]
                                                                                                ) => T[];

                                                                                                  method getContextId

                                                                                                  getContextId: (gqlContext: Record<string | symbol, any>) => ContextId;
                                                                                                  • Returns the context id of the request a GraphQL context belongs to (the one Nest middleware assigned to it, if any) and pins it on the context.

                                                                                                  method getModules

                                                                                                  getModules: (
                                                                                                  modulesContainer: Map<string, Module> | undefined,
                                                                                                  include: Function[],
                                                                                                  skipGlobalImports?: boolean
                                                                                                  ) => Module[];
                                                                                                  • Parameter skipGlobalImports

                                                                                                    whether to leave out the global modules that the included modules (or their imports) only see because they are global: Nest adds every global module to the imports of every other module.

                                                                                                  method groupMetadata

                                                                                                  groupMetadata: (
                                                                                                  resolvers: ExploredResolverMetadata[]
                                                                                                  ) => Record<string, Record<string, Function | Record<string, any>>>;
                                                                                                  • Groups the handlers by type and field name. When two handlers are found for one field, the one declared on the most derived class wins (then the one found on the most derived class), whatever the order the modules are scanned in, so that a subclass overriding a handler (e.g., to guard it) is not replaced by the base resolver it extends. Two handlers of classes that do not extend one another are refused: the order the modules are scanned in would decide which one runs.

                                                                                                  method includeWhitelisted

                                                                                                  includeWhitelisted: (
                                                                                                  modulesContainer: Map<string, Module>,
                                                                                                  include: Function[]
                                                                                                  ) => Module[];

                                                                                                    class FileSystemHelper

                                                                                                    class FileSystemHelper {}

                                                                                                      method getDirs

                                                                                                      getDirs: (path: string) => string[];

                                                                                                        method mkdirRecursive

                                                                                                        mkdirRecursive: (path: string) => Promise<void>;

                                                                                                          method writeFile

                                                                                                          writeFile: (path: string, content: string) => Promise<void>;

                                                                                                            class GqlArgumentsHost

                                                                                                            class GqlArgumentsHost
                                                                                                            extends ExecutionContextHost
                                                                                                            implements GraphQLArgumentsHost {}

                                                                                                              method create

                                                                                                              static create: (context: ArgumentsHost) => GqlArgumentsHost;

                                                                                                                method getArgs

                                                                                                                getArgs: <T = any>() => T;

                                                                                                                  method getContext

                                                                                                                  getContext: <T = any>() => T;

                                                                                                                    method getInfo

                                                                                                                    getInfo: <T = any>() => T;

                                                                                                                      method getRoot

                                                                                                                      getRoot: <T = any>() => T;

                                                                                                                        class GqlExecutionContext

                                                                                                                        class GqlExecutionContext
                                                                                                                        extends ExecutionContextHost
                                                                                                                        implements GraphQLArgumentsHost {}

                                                                                                                          method create

                                                                                                                          static create: (context: ExecutionContext) => GqlExecutionContext;

                                                                                                                            method getArgs

                                                                                                                            getArgs: <T = any>() => T;

                                                                                                                              method getContext

                                                                                                                              getContext: <T = any>() => T;

                                                                                                                                method getInfo

                                                                                                                                getInfo: <T = any>() => T;

                                                                                                                                  method getRoot

                                                                                                                                  getRoot: <T = any>() => T;

                                                                                                                                    method getType

                                                                                                                                    getType: <TContext extends string = any>() => TContext;

                                                                                                                                      class GqlSubscriptionService

                                                                                                                                      class GqlSubscriptionService {}

                                                                                                                                        constructor

                                                                                                                                        constructor(options: GqlSubscriptionServiceOptions, httpServer: any);

                                                                                                                                          method stop

                                                                                                                                          stop: () => Promise<void>;

                                                                                                                                            class GraphQLAstExplorer

                                                                                                                                            class GraphQLAstExplorer {}

                                                                                                                                              method addSymbolIfRoot

                                                                                                                                              addSymbolIfRoot: (name: string) => string;

                                                                                                                                                method explore

                                                                                                                                                explore: (
                                                                                                                                                documentNode: DocumentNode,
                                                                                                                                                outputPath: string,
                                                                                                                                                mode: 'class' | 'interface',
                                                                                                                                                options?: DefinitionsGeneratorOptions
                                                                                                                                                ) => Promise<SourceFile>;

                                                                                                                                                  method getDefaultTypes

                                                                                                                                                  getDefaultTypes: (options: DefinitionsGeneratorOptions) => {
                                                                                                                                                  [type: string]: string;
                                                                                                                                                  };

                                                                                                                                                    method getFieldTypeDefinition

                                                                                                                                                    getFieldTypeDefinition: (
                                                                                                                                                    typeNode: TypeNode,
                                                                                                                                                    options: DefinitionsGeneratorOptions
                                                                                                                                                    ) => { name: string; required: boolean };

                                                                                                                                                      method getFunctionParameters

                                                                                                                                                      getFunctionParameters: (
                                                                                                                                                      inputs: ReadonlyArray<InputValueDefinitionNode>,
                                                                                                                                                      options: DefinitionsGeneratorOptions
                                                                                                                                                      ) => ParameterDeclarationStructure[];

                                                                                                                                                        method getType

                                                                                                                                                        getType: (typeName: string, options: DefinitionsGeneratorOptions) => string;

                                                                                                                                                          method isRoot

                                                                                                                                                          isRoot: (name: string) => boolean;

                                                                                                                                                            method toDefinitionStructures

                                                                                                                                                            toDefinitionStructures: (
                                                                                                                                                            item: Readonly<TypeSystemDefinitionNode | TypeSystemExtensionNode>,
                                                                                                                                                            mode: 'class' | 'interface',
                                                                                                                                                            options: DefinitionsGeneratorOptions
                                                                                                                                                            ) =>
                                                                                                                                                            | ClassDeclarationStructure
                                                                                                                                                            | EnumDeclarationStructure
                                                                                                                                                            | InterfaceDeclarationStructure
                                                                                                                                                            | TypeAliasDeclarationStructure;

                                                                                                                                                              method toEnumDefinitionStructure

                                                                                                                                                              toEnumDefinitionStructure: (
                                                                                                                                                              item: EnumTypeDefinitionNode | EnumTypeExtensionNode,
                                                                                                                                                              options: DefinitionsGeneratorOptions
                                                                                                                                                              ) => TypeAliasDeclarationStructure | EnumDeclarationStructure;

                                                                                                                                                                method toMethodDeclarationStructure

                                                                                                                                                                toMethodDeclarationStructure: (
                                                                                                                                                                item: FieldDefinitionNode | InputValueDefinitionNode,
                                                                                                                                                                mode: 'class' | 'interface',
                                                                                                                                                                options: DefinitionsGeneratorOptions
                                                                                                                                                                ) => OptionalKind<MethodDeclarationStructure> &
                                                                                                                                                                OptionalKind<MethodSignatureStructure>;

                                                                                                                                                                  method toObjectTypeDefinitionStructure

                                                                                                                                                                  toObjectTypeDefinitionStructure: (
                                                                                                                                                                  item:
                                                                                                                                                                  | ObjectTypeDefinitionNode
                                                                                                                                                                  | ObjectTypeExtensionNode
                                                                                                                                                                  | InputObjectTypeDefinitionNode
                                                                                                                                                                  | InputObjectTypeExtensionNode
                                                                                                                                                                  | InterfaceTypeDefinitionNode
                                                                                                                                                                  | InterfaceTypeExtensionNode,
                                                                                                                                                                  mode: 'class' | 'interface',
                                                                                                                                                                  options: DefinitionsGeneratorOptions
                                                                                                                                                                  ) => ClassDeclarationStructure | InterfaceDeclarationStructure;

                                                                                                                                                                    method toPropertyDeclarationStructure

                                                                                                                                                                    toPropertyDeclarationStructure: (
                                                                                                                                                                    item: FieldDefinitionNode | InputValueDefinitionNode,
                                                                                                                                                                    options: DefinitionsGeneratorOptions
                                                                                                                                                                    ) => OptionalKind<PropertyDeclarationStructure> &
                                                                                                                                                                    OptionalKind<PropertySignatureStructure>;

                                                                                                                                                                      method toRootSchemaDefinitionStructure

                                                                                                                                                                      toRootSchemaDefinitionStructure: (
                                                                                                                                                                      operationTypes: ReadonlyArray<OperationTypeDefinitionNode>,
                                                                                                                                                                      mode: 'class' | 'interface'
                                                                                                                                                                      ) => ClassDeclarationStructure | InterfaceDeclarationStructure;

                                                                                                                                                                        method toScalarDefinitionStructure

                                                                                                                                                                        toScalarDefinitionStructure: (
                                                                                                                                                                        item: ScalarTypeDefinitionNode | ScalarTypeExtensionNode,
                                                                                                                                                                        options: DefinitionsGeneratorOptions
                                                                                                                                                                        ) => TypeAliasDeclarationStructure;

                                                                                                                                                                          method toUnionDefinitionStructure

                                                                                                                                                                          toUnionDefinitionStructure: (
                                                                                                                                                                          item: UnionTypeDefinitionNode | UnionTypeExtensionNode,
                                                                                                                                                                          options: DefinitionsGeneratorOptions
                                                                                                                                                                          ) => TypeAliasDeclarationStructure;

                                                                                                                                                                            method unwrapTypeIfNonNull

                                                                                                                                                                            unwrapTypeIfNonNull: (type: TypeNode) => { type: TypeNode; required: boolean };

                                                                                                                                                                              class GraphQLDefinitionsFactory

                                                                                                                                                                              class GraphQLDefinitionsFactory {}

                                                                                                                                                                                property gqlAstExplorer

                                                                                                                                                                                protected readonly gqlAstExplorer: GraphQLAstExplorer;

                                                                                                                                                                                  property gqlTypesLoader

                                                                                                                                                                                  protected readonly gqlTypesLoader: GraphQLTypesLoader;

                                                                                                                                                                                    method exploreAndEmit

                                                                                                                                                                                    protected exploreAndEmit: (
                                                                                                                                                                                    typePaths: string[],
                                                                                                                                                                                    path: string,
                                                                                                                                                                                    outputAs: 'class' | 'interface',
                                                                                                                                                                                    isDebugEnabled: boolean,
                                                                                                                                                                                    definitionsGeneratorOptions: DefinitionsGeneratorOptions,
                                                                                                                                                                                    typeDefs?: string | string[]
                                                                                                                                                                                    ) => Promise<void>;

                                                                                                                                                                                      method generate

                                                                                                                                                                                      generate: (options: GenerateOptions) => Promise<void>;

                                                                                                                                                                                        method printMessage

                                                                                                                                                                                        protected printMessage: (text: string, isEnabled: boolean) => void;

                                                                                                                                                                                          class GraphQLFactory

                                                                                                                                                                                          class GraphQLFactory {}

                                                                                                                                                                                            constructor

                                                                                                                                                                                            constructor(
                                                                                                                                                                                            resolversExplorerService: ResolversExplorerService,
                                                                                                                                                                                            scalarsExplorerService: ScalarsExplorerService,
                                                                                                                                                                                            graphqlAstExplorer: GraphQLAstExplorer,
                                                                                                                                                                                            gqlSchemaBuilder: GraphQLSchemaBuilder
                                                                                                                                                                                            );

                                                                                                                                                                                              method generateDefinitions

                                                                                                                                                                                              generateDefinitions: (
                                                                                                                                                                                              typeDefs: string | string[],
                                                                                                                                                                                              options: GqlModuleOptions
                                                                                                                                                                                              ) => Promise<void>;

                                                                                                                                                                                                method generateSchema

                                                                                                                                                                                                generateSchema: <T extends GqlModuleOptions<any>>(
                                                                                                                                                                                                options?: T
                                                                                                                                                                                                ) => Promise<GraphQLSchema>;

                                                                                                                                                                                                  class GraphQLFederationDefinitionsFactory

                                                                                                                                                                                                  class GraphQLFederationDefinitionsFactory extends GraphQLDefinitionsFactory {}

                                                                                                                                                                                                  method exploreAndEmit

                                                                                                                                                                                                  protected exploreAndEmit: (
                                                                                                                                                                                                  typePaths: string[],
                                                                                                                                                                                                  path: string,
                                                                                                                                                                                                  outputAs: 'class' | 'interface',
                                                                                                                                                                                                  isDebugEnabled: boolean,
                                                                                                                                                                                                  definitionsGeneratorOptions: DefinitionsGeneratorOptions,
                                                                                                                                                                                                  typeDefs?: string | string[]
                                                                                                                                                                                                  ) => Promise<void>;

                                                                                                                                                                                                    class GraphQLFederationFactory

                                                                                                                                                                                                    class GraphQLFederationFactory {}

                                                                                                                                                                                                    constructor

                                                                                                                                                                                                    constructor(
                                                                                                                                                                                                    resolversExplorerService: ResolversExplorerService,
                                                                                                                                                                                                    scalarsExplorerService: ScalarsExplorerService,
                                                                                                                                                                                                    gqlSchemaBuilder: GraphQLSchemaBuilder,
                                                                                                                                                                                                    typeDefsDecoratorFactory: TypeDefsDecoratorFactory
                                                                                                                                                                                                    );

                                                                                                                                                                                                      method buildFederatedSchema

                                                                                                                                                                                                      buildFederatedSchema: <T extends GqlModuleOptions<any>>(
                                                                                                                                                                                                      autoSchemaFile: AutoSchemaFileValue,
                                                                                                                                                                                                      options: T,
                                                                                                                                                                                                      resolvers: Function[]
                                                                                                                                                                                                      ) => Promise<GraphQLSchema>;

                                                                                                                                                                                                        method generateSchema

                                                                                                                                                                                                        generateSchema: <T extends GqlModuleOptions<any>>(
                                                                                                                                                                                                        options?: T,
                                                                                                                                                                                                        buildFederatedSchema?: (
                                                                                                                                                                                                        options: BuildFederatedSchemaOptions
                                                                                                                                                                                                        ) => GraphQLSchema
                                                                                                                                                                                                        ) => Promise<GraphQLSchema>;

                                                                                                                                                                                                          class GraphQLModule

                                                                                                                                                                                                          class GraphQLModule<TAdapter extends AbstractGraphQLDriver = AbstractGraphQLDriver>
                                                                                                                                                                                                          implements OnModuleInit, OnModuleDestroy, OnApplicationShutdown {}

                                                                                                                                                                                                          constructor

                                                                                                                                                                                                          constructor(
                                                                                                                                                                                                          httpAdapterHost: HttpAdapterHost,
                                                                                                                                                                                                          options: GqlModuleOptions<any>,
                                                                                                                                                                                                          _graphQlAdapter: AbstractGraphQLDriver<GqlModuleOptions<any>>,
                                                                                                                                                                                                          graphQlTypesLoader: GraphQLTypesLoader,
                                                                                                                                                                                                          gqlSchemaHost: GraphQLSchemaHost
                                                                                                                                                                                                          );

                                                                                                                                                                                                            property completeOptions

                                                                                                                                                                                                            completeOptions: GqlModuleOptions<any>;

                                                                                                                                                                                                              property graphQlAdapter

                                                                                                                                                                                                              readonly graphQlAdapter: AbstractGraphQLDriver<GqlModuleOptions<any>>;

                                                                                                                                                                                                                method forRoot

                                                                                                                                                                                                                static forRoot: <TOptions extends Record<string, any> = GqlModuleOptions<any>>(
                                                                                                                                                                                                                options?: TOptions
                                                                                                                                                                                                                ) => DynamicModule;

                                                                                                                                                                                                                  method forRootAsync

                                                                                                                                                                                                                  static forRootAsync: <
                                                                                                                                                                                                                  TOptions extends Record<string, any> = GqlModuleOptions<any>
                                                                                                                                                                                                                  >(
                                                                                                                                                                                                                  options: GqlModuleAsyncOptions<TOptions, GqlOptionsFactory<TOptions>>
                                                                                                                                                                                                                  ) => DynamicModule;

                                                                                                                                                                                                                    method onApplicationShutdown

                                                                                                                                                                                                                    onApplicationShutdown: () => Promise<void>;

                                                                                                                                                                                                                      method onModuleDestroy

                                                                                                                                                                                                                      onModuleDestroy: () => Promise<void>;

                                                                                                                                                                                                                        method onModuleInit

                                                                                                                                                                                                                        onModuleInit: () => Promise<void>;

                                                                                                                                                                                                                          class GraphQLSchemaBuilderModule

                                                                                                                                                                                                                          class GraphQLSchemaBuilderModule {}

                                                                                                                                                                                                                            class GraphQLSchemaFactory

                                                                                                                                                                                                                            class GraphQLSchemaFactory {}

                                                                                                                                                                                                                              constructor

                                                                                                                                                                                                                              constructor(
                                                                                                                                                                                                                              queryTypeFactory: QueryTypeFactory,
                                                                                                                                                                                                                              mutationTypeFactory: MutationTypeFactory,
                                                                                                                                                                                                                              subscriptionTypeFactory: SubscriptionTypeFactory,
                                                                                                                                                                                                                              orphanedTypesFactory: OrphanedTypesFactory,
                                                                                                                                                                                                                              typeDefinitionsGenerator: TypeDefinitionsGenerator
                                                                                                                                                                                                                              );

                                                                                                                                                                                                                                method create

                                                                                                                                                                                                                                create: {
                                                                                                                                                                                                                                (resolvers: Function[]): Promise<GraphQLSchema>;
                                                                                                                                                                                                                                (resolvers: Function[], scalarClasses: Function[]): Promise<GraphQLSchema>;
                                                                                                                                                                                                                                (resolvers: Function[], options: BuildSchemaOptions): Promise<GraphQLSchema>;
                                                                                                                                                                                                                                (
                                                                                                                                                                                                                                resolvers: Function[],
                                                                                                                                                                                                                                scalarClasses: Function[],
                                                                                                                                                                                                                                options: BuildSchemaOptions
                                                                                                                                                                                                                                ): Promise<GraphQLSchema>;
                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                  class GraphQLSchemaHost

                                                                                                                                                                                                                                  class GraphQLSchemaHost {}

                                                                                                                                                                                                                                    property schema

                                                                                                                                                                                                                                    schema: GraphQLSchema;

                                                                                                                                                                                                                                      class GraphQLTypesLoader

                                                                                                                                                                                                                                      class GraphQLTypesLoader {}

                                                                                                                                                                                                                                        method mergeTypesByPaths

                                                                                                                                                                                                                                        mergeTypesByPaths: (paths: string | string[]) => Promise<string>;

                                                                                                                                                                                                                                          class ResolverDecoratorHost

                                                                                                                                                                                                                                          class ResolverDecoratorHost {}

                                                                                                                                                                                                                                          method decorate

                                                                                                                                                                                                                                          decorate: (target: (...args: unknown[]) => void) => (...args: unknown[]) => void;

                                                                                                                                                                                                                                            method getDecorator

                                                                                                                                                                                                                                            getDecorator: () => (...args: unknown[]) => void;

                                                                                                                                                                                                                                              method getOnRequestEndHook

                                                                                                                                                                                                                                              getOnRequestEndHook: () => GqlRequestEndHook;

                                                                                                                                                                                                                                                method getOnRequestStartHook

                                                                                                                                                                                                                                                getOnRequestStartHook: () => GqlRequestStartHook;

                                                                                                                                                                                                                                                  method hasRequestHooks

                                                                                                                                                                                                                                                  hasRequestHooks: () => boolean;
                                                                                                                                                                                                                                                  • Indicates whether any of the request lifecycle hooks has been registered.

                                                                                                                                                                                                                                                  method onRequestEnd

                                                                                                                                                                                                                                                  onRequestEnd: (context: GqlRequestEndHookContext) => void | Promise<void>;
                                                                                                                                                                                                                                                  • Calls the "request end" hook. The promise of an async hook is returned, for the caller to await.

                                                                                                                                                                                                                                                  method onRequestStart

                                                                                                                                                                                                                                                  onRequestStart: (context: GqlRequestStartHookContext) => unknown;
                                                                                                                                                                                                                                                  • Calls the "request start" hook and returns what it returns: the promise of an async hook is returned as is, for the caller to await.

                                                                                                                                                                                                                                                  method setDecorator

                                                                                                                                                                                                                                                  setDecorator: (
                                                                                                                                                                                                                                                  decorator: (fn: (...args: unknown[]) => void) => (...args: unknown[]) => void
                                                                                                                                                                                                                                                  ) => void;

                                                                                                                                                                                                                                                    method setOnRequestEndHook

                                                                                                                                                                                                                                                    setOnRequestEndHook: (hook: GqlRequestEndHook) => void;
                                                                                                                                                                                                                                                    • Registers a hook that is called once a GraphQL operation has been fully processed (right before the response is sent back to the client).

                                                                                                                                                                                                                                                    method setOnRequestStartHook

                                                                                                                                                                                                                                                    setOnRequestStartHook: (hook: GqlRequestStartHook) => void;
                                                                                                                                                                                                                                                    • Registers a hook that is called right before a GraphQL operation starts being processed. Whatever it returns is passed back to the "request end" hook through the state property.

                                                                                                                                                                                                                                                    class UnableToFindFieldsError

                                                                                                                                                                                                                                                    class UnableToFindFieldsError extends Error {}

                                                                                                                                                                                                                                                    constructor

                                                                                                                                                                                                                                                    constructor(name: string);

                                                                                                                                                                                                                                                      Interfaces

                                                                                                                                                                                                                                                      interface AliasDirectiveImport

                                                                                                                                                                                                                                                      interface AliasDirectiveImport {}

                                                                                                                                                                                                                                                        property as

                                                                                                                                                                                                                                                        as: string;

                                                                                                                                                                                                                                                          property name

                                                                                                                                                                                                                                                          name: string;

                                                                                                                                                                                                                                                            interface ArgsTypeOptions

                                                                                                                                                                                                                                                            interface ArgsTypeOptions {}
                                                                                                                                                                                                                                                            • Interface defining options that can be passed to @ArgsType() decorator.

                                                                                                                                                                                                                                                            property registerIn

                                                                                                                                                                                                                                                            registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                            • NestJS module that this type belongs to. When specified, this type will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                              See Also

                                                                                                                                                                                                                                                              • RegisterInOption for details

                                                                                                                                                                                                                                                            interface BuildFederatedSchemaOptions

                                                                                                                                                                                                                                                            interface BuildFederatedSchemaOptions {}

                                                                                                                                                                                                                                                              property resolvers

                                                                                                                                                                                                                                                              resolvers: any;

                                                                                                                                                                                                                                                                property typeDefs

                                                                                                                                                                                                                                                                typeDefs: DocumentNode;

                                                                                                                                                                                                                                                                  interface BuildSchemaOptions

                                                                                                                                                                                                                                                                  interface BuildSchemaOptions {}

                                                                                                                                                                                                                                                                    property addNewlineAtEnd

                                                                                                                                                                                                                                                                    addNewlineAtEnd?: boolean;
                                                                                                                                                                                                                                                                    • Add new line at the end of the generated GraphQL SDL file

                                                                                                                                                                                                                                                                    property dateScalarMode

                                                                                                                                                                                                                                                                    dateScalarMode?: DateScalarMode;
                                                                                                                                                                                                                                                                    • Date scalar mode 'isoDate'

                                                                                                                                                                                                                                                                    property directives

                                                                                                                                                                                                                                                                    directives?: GraphQLDirective[];
                                                                                                                                                                                                                                                                    • GraphQL directives

                                                                                                                                                                                                                                                                    property fieldMiddleware

                                                                                                                                                                                                                                                                    fieldMiddleware?: FieldMiddleware[];
                                                                                                                                                                                                                                                                    • Array of global field middleware functions

                                                                                                                                                                                                                                                                    property noDuplicatedFields

                                                                                                                                                                                                                                                                    noDuplicatedFields?: boolean;
                                                                                                                                                                                                                                                                    • Set to true if it should throw an error when the same Query / Mutation field is defined more than once

                                                                                                                                                                                                                                                                    property numberScalarMode

                                                                                                                                                                                                                                                                    numberScalarMode?: NumberScalarMode;
                                                                                                                                                                                                                                                                    • Number scalar mode 'float'

                                                                                                                                                                                                                                                                    property orphanedTypes

                                                                                                                                                                                                                                                                    orphanedTypes?: (Function | object)[];
                                                                                                                                                                                                                                                                    • Orphaned type classes/enums that are not explicitly used in GraphQL types definitions

                                                                                                                                                                                                                                                                    property scalarsMap

                                                                                                                                                                                                                                                                    scalarsMap?: ScalarsTypeMap[];
                                                                                                                                                                                                                                                                    • Scalars map

                                                                                                                                                                                                                                                                    property skipCheck

                                                                                                                                                                                                                                                                    skipCheck?: boolean;
                                                                                                                                                                                                                                                                    • Disable checking on build the correctness of a schema

                                                                                                                                                                                                                                                                    interface CustomScalar

                                                                                                                                                                                                                                                                    interface CustomScalar<T, K> {}

                                                                                                                                                                                                                                                                      property description

                                                                                                                                                                                                                                                                      description?: string;

                                                                                                                                                                                                                                                                        property extensions

                                                                                                                                                                                                                                                                        extensions?: Record<string, unknown>;
                                                                                                                                                                                                                                                                        • Arbitrary metadata attached to the scalar, accessible through the generated GraphQLScalarType's extensions field.

                                                                                                                                                                                                                                                                        property parseLiteral

                                                                                                                                                                                                                                                                        parseLiteral: (
                                                                                                                                                                                                                                                                        valueNode: ValueNode,
                                                                                                                                                                                                                                                                        variables?: {
                                                                                                                                                                                                                                                                        [key: string]: any;
                                                                                                                                                                                                                                                                        } | null
                                                                                                                                                                                                                                                                        ) => K | null | undefined;
                                                                                                                                                                                                                                                                        • Parses an inline literal. Throw a GraphQLError for a literal the scalar cannot represent; a null or undefined result is treated as invalid input as well (it never becomes the value of the argument).

                                                                                                                                                                                                                                                                        property parseValue

                                                                                                                                                                                                                                                                        parseValue: (value: unknown) => K | null | undefined;
                                                                                                                                                                                                                                                                        • Parses a variable value. Throw a GraphQLError for input the scalar cannot represent; a null or undefined result is treated as invalid input as well (it never becomes the value of the argument).

                                                                                                                                                                                                                                                                        property serialize

                                                                                                                                                                                                                                                                        serialize: (value: unknown) => T | null | undefined;

                                                                                                                                                                                                                                                                          property specifiedByURL

                                                                                                                                                                                                                                                                          specifiedByURL?: string;
                                                                                                                                                                                                                                                                          • URL pointing to the specification for this scalar (emitted as the @specifiedBy(url: ...) directive in the generated SDL).

                                                                                                                                                                                                                                                                          interface DefinitionsGeneratorOptions

                                                                                                                                                                                                                                                                          interface DefinitionsGeneratorOptions {}

                                                                                                                                                                                                                                                                            property additionalHeader

                                                                                                                                                                                                                                                                            additionalHeader?: string;
                                                                                                                                                                                                                                                                            • If provided, specifies a custom header to add after the to the output file (eg. for custom type imports or comments) undefined

                                                                                                                                                                                                                                                                            property customScalarTypeMapping

                                                                                                                                                                                                                                                                            customScalarTypeMapping?: Record<
                                                                                                                                                                                                                                                                            string,
                                                                                                                                                                                                                                                                            | string
                                                                                                                                                                                                                                                                            | {
                                                                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                                                            >;
                                                                                                                                                                                                                                                                            • If provided, specifies a mapping of types to use for custom scalars undefined

                                                                                                                                                                                                                                                                            property defaultScalarType

                                                                                                                                                                                                                                                                            defaultScalarType?: string;
                                                                                                                                                                                                                                                                            • If provided, specifies a default generated TypeScript type for custom scalars. 'any'

                                                                                                                                                                                                                                                                            property defaultTypeMapping

                                                                                                                                                                                                                                                                            defaultTypeMapping?: Partial<
                                                                                                                                                                                                                                                                            Record<'ID' | 'Float' | 'Int', 'string' | 'number'> &
                                                                                                                                                                                                                                                                            Record<'Boolean' | 'String', 'boolean' | 'string' | 'number'>
                                                                                                                                                                                                                                                                            >;
                                                                                                                                                                                                                                                                            • If provided, specifies a mapping of default scalar types (Int, Boolean, ID, Float, String). undefined

                                                                                                                                                                                                                                                                            property emitDescriptions

                                                                                                                                                                                                                                                                            emitDescriptions?: boolean;
                                                                                                                                                                                                                                                                            • If true, GraphQL descriptions are emitted as TSDoc/JSDoc comments on the generated types and fields. false

                                                                                                                                                                                                                                                                            property emitTypenameField

                                                                                                                                                                                                                                                                            emitTypenameField?: boolean;
                                                                                                                                                                                                                                                                            • If true, the additional "__typename" field is generated for every object type. false

                                                                                                                                                                                                                                                                            property enumsAsTypes

                                                                                                                                                                                                                                                                            enumsAsTypes?: boolean;
                                                                                                                                                                                                                                                                            • If true, enums are generated as string literal union types. false

                                                                                                                                                                                                                                                                            property skipResolverArgs

                                                                                                                                                                                                                                                                            skipResolverArgs?: boolean;
                                                                                                                                                                                                                                                                            • If true, resolvers (query/mutation/etc) are generated as plain fields without arguments. false

                                                                                                                                                                                                                                                                            property typeName

                                                                                                                                                                                                                                                                            typeName?: (name: string) => string;
                                                                                                                                                                                                                                                                            • If provided, specifies a function to transform type names.

                                                                                                                                                                                                                                                                              Example 1

                                                                                                                                                                                                                                                                              (name) => ${name}Schema undefined

                                                                                                                                                                                                                                                                            interface EnumOptions

                                                                                                                                                                                                                                                                            interface EnumOptions<T extends object = any> {}
                                                                                                                                                                                                                                                                            • Interface defining options that can be passed to registerEnumType function.

                                                                                                                                                                                                                                                                            property description

                                                                                                                                                                                                                                                                            description?: string;
                                                                                                                                                                                                                                                                            • Description of the enum.

                                                                                                                                                                                                                                                                            property directives

                                                                                                                                                                                                                                                                            directives?: string[];
                                                                                                                                                                                                                                                                            • An array of directive SDL strings (e.g. ['@tag(name: "internal")']) to be applied on the generated enum type.

                                                                                                                                                                                                                                                                            property name

                                                                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                                                                            • Name of the enum.

                                                                                                                                                                                                                                                                            property registerIn

                                                                                                                                                                                                                                                                            registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                                            • NestJS module that this enum belongs to. When specified, this enum will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                                              See Also

                                                                                                                                                                                                                                                                              • RegisterInOption for details

                                                                                                                                                                                                                                                                            property valuesMap

                                                                                                                                                                                                                                                                            valuesMap?: EnumMetadataValuesMap<T>;
                                                                                                                                                                                                                                                                            • A map of options for the values of the enum.

                                                                                                                                                                                                                                                                            interface ExploredResolverMetadata

                                                                                                                                                                                                                                                                            interface ExploredResolverMetadata extends ResolverMetadata {}
                                                                                                                                                                                                                                                                            • A handler found by an explorer, along with the classes groupMetadata() needs to tell which of two handlers of the same field takes precedence.

                                                                                                                                                                                                                                                                            property declaredOn

                                                                                                                                                                                                                                                                            declaredOn?: Function;
                                                                                                                                                                                                                                                                            • The class whose prototype declares the handler method.

                                                                                                                                                                                                                                                                            property target

                                                                                                                                                                                                                                                                            target?: Function;
                                                                                                                                                                                                                                                                            • The class of the instance the handler was found on.

                                                                                                                                                                                                                                                                            interface Federation2Config

                                                                                                                                                                                                                                                                            interface Federation2Config {}

                                                                                                                                                                                                                                                                              property directives

                                                                                                                                                                                                                                                                              directives?: (string | AliasDirectiveImport)[];
                                                                                                                                                                                                                                                                              • The imported directives ['@authenticated', '@cacheTag', '@composeDirective', '@context', '@cost', '@extends', '@external', '@fromContext', '@inaccessible', '@interfaceObject', '@key', '@listSize', '@override', '@policy', '@provides', '@requires', '@requiresScopes', '@shareable', '@tag']

                                                                                                                                                                                                                                                                              property importUrl

                                                                                                                                                                                                                                                                              importUrl?: string;
                                                                                                                                                                                                                                                                              • The import link 'https://specs.apollo.dev/federation/v2.14'

                                                                                                                                                                                                                                                                              property version

                                                                                                                                                                                                                                                                              version: 2;

                                                                                                                                                                                                                                                                                interface FieldMiddleware

                                                                                                                                                                                                                                                                                interface FieldMiddleware<
                                                                                                                                                                                                                                                                                TSource = any,
                                                                                                                                                                                                                                                                                TContext = any,
                                                                                                                                                                                                                                                                                TArgs = {
                                                                                                                                                                                                                                                                                [argName: string]: any;
                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                TOutput = any
                                                                                                                                                                                                                                                                                > {}

                                                                                                                                                                                                                                                                                  call signature

                                                                                                                                                                                                                                                                                  (ctx: MiddlewareContext<TSource, TContext, TArgs>, next: NextFn):
                                                                                                                                                                                                                                                                                  | Promise<TOutput>
                                                                                                                                                                                                                                                                                  | TOutput;

                                                                                                                                                                                                                                                                                    interface GqlExceptionFilter

                                                                                                                                                                                                                                                                                    interface GqlExceptionFilter<TInput = any, TOutput = any> {}
                                                                                                                                                                                                                                                                                    • Interface defining a GraphQL exception filter.

                                                                                                                                                                                                                                                                                    method catch

                                                                                                                                                                                                                                                                                    catch: (exception: TInput, host: ArgumentsHost) => TOutput;

                                                                                                                                                                                                                                                                                      interface GqlModuleAsyncOptions

                                                                                                                                                                                                                                                                                      interface GqlModuleAsyncOptions<
                                                                                                                                                                                                                                                                                      TOptions extends Record<string, any> = GqlModuleOptions,
                                                                                                                                                                                                                                                                                      TFactory = GqlOptionsFactory<TOptions>
                                                                                                                                                                                                                                                                                      > extends Pick<ModuleMetadata, 'imports'> {}

                                                                                                                                                                                                                                                                                        property driver

                                                                                                                                                                                                                                                                                        driver?: TOptions['driver'];
                                                                                                                                                                                                                                                                                        • GraphQL server driver

                                                                                                                                                                                                                                                                                        property inject

                                                                                                                                                                                                                                                                                        inject?: any[];

                                                                                                                                                                                                                                                                                          property useClass

                                                                                                                                                                                                                                                                                          useClass?: Type<TFactory>;

                                                                                                                                                                                                                                                                                            property useExisting

                                                                                                                                                                                                                                                                                            useExisting?: Type<TFactory>;

                                                                                                                                                                                                                                                                                              property useFactory

                                                                                                                                                                                                                                                                                              useFactory?: (
                                                                                                                                                                                                                                                                                              ...args: any[]
                                                                                                                                                                                                                                                                                              ) => Promise<Omit<TOptions, 'driver'>> | Omit<TOptions, 'driver'>;

                                                                                                                                                                                                                                                                                                interface GqlModuleOptions

                                                                                                                                                                                                                                                                                                interface GqlModuleOptions<TDriver extends GraphQLDriver = any> {}
                                                                                                                                                                                                                                                                                                • "GraphQLModule" options object.

                                                                                                                                                                                                                                                                                                property autoSchemaFile

                                                                                                                                                                                                                                                                                                autoSchemaFile?: AutoSchemaFileValue;
                                                                                                                                                                                                                                                                                                • If enabled, GraphQL schema will be generated automatically

                                                                                                                                                                                                                                                                                                property buildSchemaOptions

                                                                                                                                                                                                                                                                                                buildSchemaOptions?: BuildSchemaOptions;
                                                                                                                                                                                                                                                                                                • Options to be passed to the schema generator Only applicable if "autoSchemaFile" = true

                                                                                                                                                                                                                                                                                                property context

                                                                                                                                                                                                                                                                                                context?: any;
                                                                                                                                                                                                                                                                                                • Context function

                                                                                                                                                                                                                                                                                                property debug

                                                                                                                                                                                                                                                                                                debug?: boolean;
                                                                                                                                                                                                                                                                                                • If true, enables development mode helpers and logs messages of all severity levels If false, only warn- and error-level messages are logged. true

                                                                                                                                                                                                                                                                                                property definitions

                                                                                                                                                                                                                                                                                                definitions?: {
                                                                                                                                                                                                                                                                                                path?: string;
                                                                                                                                                                                                                                                                                                outputAs?: 'class' | 'interface';
                                                                                                                                                                                                                                                                                                } & DefinitionsGeneratorOptions;
                                                                                                                                                                                                                                                                                                • TypeScript definitions generator options

                                                                                                                                                                                                                                                                                                property directiveResolvers

                                                                                                                                                                                                                                                                                                directiveResolvers?: any;
                                                                                                                                                                                                                                                                                                • Directive resolvers

                                                                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                                                                  This option is ignored (it has had no effect since v9.2.0): the directive resolvers passed through it are never called, and a warning is logged at startup when it is set. Apply the directives with transformSchema instead (for example, with mapSchema() from @graphql-tools/utils).

                                                                                                                                                                                                                                                                                                property driver

                                                                                                                                                                                                                                                                                                driver?: Type<TDriver>;
                                                                                                                                                                                                                                                                                                • GraphQL server adapter

                                                                                                                                                                                                                                                                                                property fieldResolverEnhancers

                                                                                                                                                                                                                                                                                                fieldResolverEnhancers?: Enhancer[];
                                                                                                                                                                                                                                                                                                • Enable/disable enhancers for @ResolveField()

                                                                                                                                                                                                                                                                                                property include

                                                                                                                                                                                                                                                                                                include?: Function[];
                                                                                                                                                                                                                                                                                                • An array of modules to scan when searching for resolvers

                                                                                                                                                                                                                                                                                                property inheritResolversFromInterfaces

                                                                                                                                                                                                                                                                                                inheritResolversFromInterfaces?: boolean;
                                                                                                                                                                                                                                                                                                • Inherit missing resolvers from their interface types defined in the resolvers object.

                                                                                                                                                                                                                                                                                                property introspection

                                                                                                                                                                                                                                                                                                introspection?: boolean;
                                                                                                                                                                                                                                                                                                • If true, enables schema introspection by clients. Default is true unless NODE_ENV is set to production true

                                                                                                                                                                                                                                                                                                property metadata

                                                                                                                                                                                                                                                                                                metadata?: () => Promise<Record<string, any>>;
                                                                                                                                                                                                                                                                                                • Extra static metadata to be loaded into the specification

                                                                                                                                                                                                                                                                                                property path

                                                                                                                                                                                                                                                                                                path?: string;
                                                                                                                                                                                                                                                                                                • Path to mount GraphQL API

                                                                                                                                                                                                                                                                                                property resolvers

                                                                                                                                                                                                                                                                                                resolvers?: IResolvers | Array<IResolvers>;
                                                                                                                                                                                                                                                                                                • Extra resolvers to be registered.

                                                                                                                                                                                                                                                                                                property resolverValidationOptions

                                                                                                                                                                                                                                                                                                resolverValidationOptions?: IResolverValidationOptions;
                                                                                                                                                                                                                                                                                                • Resolver validation options.

                                                                                                                                                                                                                                                                                                property schema

                                                                                                                                                                                                                                                                                                schema?: GraphQLSchema;
                                                                                                                                                                                                                                                                                                • Optional GraphQL schema (to be used or to be merged)

                                                                                                                                                                                                                                                                                                property sortSchema

                                                                                                                                                                                                                                                                                                sortSchema?: boolean;
                                                                                                                                                                                                                                                                                                • Sort the schema lexicographically

                                                                                                                                                                                                                                                                                                property stopOnApplicationShutdown

                                                                                                                                                                                                                                                                                                stopOnApplicationShutdown?: boolean;
                                                                                                                                                                                                                                                                                                • If true, the GraphQL server will stop after beforeApplicationShutdown (right before the HTTP server closes) instead of during onModuleDestroy. This allows the server to keep accepting requests during beforeApplicationShutdown, enabling graceful shutdown. false

                                                                                                                                                                                                                                                                                                property transformAutoSchemaFile

                                                                                                                                                                                                                                                                                                transformAutoSchemaFile?: boolean;
                                                                                                                                                                                                                                                                                                • Apply transformSchema to the autoSchemaFile

                                                                                                                                                                                                                                                                                                property transformResolvers

                                                                                                                                                                                                                                                                                                transformResolvers?: (
                                                                                                                                                                                                                                                                                                resolvers: IResolvers | Array<IResolvers>
                                                                                                                                                                                                                                                                                                ) =>
                                                                                                                                                                                                                                                                                                | IResolvers
                                                                                                                                                                                                                                                                                                | Array<IResolvers>
                                                                                                                                                                                                                                                                                                | Promise<IResolvers>
                                                                                                                                                                                                                                                                                                | Promise<Array<IResolvers>>;
                                                                                                                                                                                                                                                                                                • Function to be applied to the discovered resolvers letting you perform compositions.

                                                                                                                                                                                                                                                                                                property transformSchema

                                                                                                                                                                                                                                                                                                transformSchema?: (
                                                                                                                                                                                                                                                                                                schema: GraphQLSchema
                                                                                                                                                                                                                                                                                                ) => GraphQLSchema | Promise<GraphQLSchema>;
                                                                                                                                                                                                                                                                                                • Function to be applied to the schema letting you register custom transformations.

                                                                                                                                                                                                                                                                                                property typeDefs

                                                                                                                                                                                                                                                                                                typeDefs?: string | string[];
                                                                                                                                                                                                                                                                                                • Type definitions

                                                                                                                                                                                                                                                                                                property typePaths

                                                                                                                                                                                                                                                                                                typePaths?: string[];
                                                                                                                                                                                                                                                                                                • Paths to files that contain GraphQL definitions

                                                                                                                                                                                                                                                                                                property useGlobalPrefix

                                                                                                                                                                                                                                                                                                useGlobalPrefix?: boolean;
                                                                                                                                                                                                                                                                                                • Prepends the global prefix to the url

                                                                                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                                                                                  • [faq/global-prefix](Global Prefix)

                                                                                                                                                                                                                                                                                                interface GqlOptionsFactory

                                                                                                                                                                                                                                                                                                interface GqlOptionsFactory<T extends Record<string, any> = GqlModuleOptions> {}

                                                                                                                                                                                                                                                                                                  method createGqlOptions

                                                                                                                                                                                                                                                                                                  createGqlOptions: () => Promise<Omit<T, 'driver'>> | Omit<T, 'driver'>;

                                                                                                                                                                                                                                                                                                    interface GqlRequestEndHookContext

                                                                                                                                                                                                                                                                                                    interface GqlRequestEndHookContext extends GqlRequestStartHookContext {}
                                                                                                                                                                                                                                                                                                    • Context passed to the "request end" hook.

                                                                                                                                                                                                                                                                                                    property errors

                                                                                                                                                                                                                                                                                                    errors?: readonly GraphQLError[];
                                                                                                                                                                                                                                                                                                    • Errors collected during the execution of the operation (if any).

                                                                                                                                                                                                                                                                                                    property state

                                                                                                                                                                                                                                                                                                    state?: unknown;
                                                                                                                                                                                                                                                                                                    • Value returned from the corresponding "request start" hook. Useful to carry over instrumentation state (spans, timestamps, etc.).

                                                                                                                                                                                                                                                                                                    interface GqlRequestStartHookContext

                                                                                                                                                                                                                                                                                                    interface GqlRequestStartHookContext {}
                                                                                                                                                                                                                                                                                                    • Context passed to the "request start" hook.

                                                                                                                                                                                                                                                                                                    property context

                                                                                                                                                                                                                                                                                                    context?: Record<string, unknown>;
                                                                                                                                                                                                                                                                                                    • GraphQL context object associated with this request.

                                                                                                                                                                                                                                                                                                    property operationName

                                                                                                                                                                                                                                                                                                    operationName?: string;
                                                                                                                                                                                                                                                                                                    • Name of the operation being executed (if provided by the client).

                                                                                                                                                                                                                                                                                                    property query

                                                                                                                                                                                                                                                                                                    query?: string;
                                                                                                                                                                                                                                                                                                    • Raw GraphQL document sent by the client (if available).

                                                                                                                                                                                                                                                                                                    property variables

                                                                                                                                                                                                                                                                                                    variables?: Record<string, unknown>;
                                                                                                                                                                                                                                                                                                    • Variables sent along with the operation.

                                                                                                                                                                                                                                                                                                    interface GqlSubscriptionServiceOptions

                                                                                                                                                                                                                                                                                                    interface GqlSubscriptionServiceOptions extends SubscriptionConfig {}

                                                                                                                                                                                                                                                                                                      property context

                                                                                                                                                                                                                                                                                                      context?: ServerOptions['context'];

                                                                                                                                                                                                                                                                                                        property execute

                                                                                                                                                                                                                                                                                                        execute?: typeof graphqlExecute;

                                                                                                                                                                                                                                                                                                          property path

                                                                                                                                                                                                                                                                                                          path?: string;

                                                                                                                                                                                                                                                                                                            property schema

                                                                                                                                                                                                                                                                                                            schema: GraphQLSchema;

                                                                                                                                                                                                                                                                                                              property subscribe

                                                                                                                                                                                                                                                                                                              subscribe?: typeof graphqlSubscribe;

                                                                                                                                                                                                                                                                                                                interface GraphQLArgumentsHost

                                                                                                                                                                                                                                                                                                                interface GraphQLArgumentsHost extends ArgumentsHost {}

                                                                                                                                                                                                                                                                                                                  method getArgs

                                                                                                                                                                                                                                                                                                                  getArgs: <T = any>() => T;

                                                                                                                                                                                                                                                                                                                    method getContext

                                                                                                                                                                                                                                                                                                                    getContext: <T = any>() => T;

                                                                                                                                                                                                                                                                                                                      method getInfo

                                                                                                                                                                                                                                                                                                                      getInfo: <T = any>() => T;

                                                                                                                                                                                                                                                                                                                        method getRoot

                                                                                                                                                                                                                                                                                                                        getRoot: <T = any>() => T;

                                                                                                                                                                                                                                                                                                                          interface GraphQLDriver

                                                                                                                                                                                                                                                                                                                          interface GraphQLDriver<TOptions = any> {}

                                                                                                                                                                                                                                                                                                                            method start

                                                                                                                                                                                                                                                                                                                            start: (options: TOptions) => Promise<unknown>;

                                                                                                                                                                                                                                                                                                                              method stop

                                                                                                                                                                                                                                                                                                                              stop: () => Promise<void>;

                                                                                                                                                                                                                                                                                                                                interface GraphQLWsServer

                                                                                                                                                                                                                                                                                                                                interface GraphQLWsServer {}
                                                                                                                                                                                                                                                                                                                                • The members of a ws WebSocketServer that Nest relies on. Typed structurally, so that the public types of @nestjs/graphql don't depend on @types/ws: pass a new WebSocketServer({ noServer: true, ... }) instance.

                                                                                                                                                                                                                                                                                                                                property options

                                                                                                                                                                                                                                                                                                                                options: {
                                                                                                                                                                                                                                                                                                                                noServer?: boolean;
                                                                                                                                                                                                                                                                                                                                path?: string;
                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                  method emit

                                                                                                                                                                                                                                                                                                                                  emit: (event: 'connection', ...args: any[]) => boolean;

                                                                                                                                                                                                                                                                                                                                    method handleUpgrade

                                                                                                                                                                                                                                                                                                                                    handleUpgrade: (
                                                                                                                                                                                                                                                                                                                                    request: any,
                                                                                                                                                                                                                                                                                                                                    socket: any,
                                                                                                                                                                                                                                                                                                                                    upgradeHead: any,
                                                                                                                                                                                                                                                                                                                                    callback: (client: any, request: any) => void
                                                                                                                                                                                                                                                                                                                                    ) => void;

                                                                                                                                                                                                                                                                                                                                      interface InputTypeOptions

                                                                                                                                                                                                                                                                                                                                      interface InputTypeOptions {}
                                                                                                                                                                                                                                                                                                                                      • Interface defining options that can be passed to @InputType() decorator.

                                                                                                                                                                                                                                                                                                                                      property description

                                                                                                                                                                                                                                                                                                                                      description?: string;
                                                                                                                                                                                                                                                                                                                                      • Description of the input type.

                                                                                                                                                                                                                                                                                                                                      property isAbstract

                                                                                                                                                                                                                                                                                                                                      isAbstract?: boolean;
                                                                                                                                                                                                                                                                                                                                      • If true, type will not be registered in the schema.

                                                                                                                                                                                                                                                                                                                                      property isOneOf

                                                                                                                                                                                                                                                                                                                                      isOneOf?: boolean;
                                                                                                                                                                                                                                                                                                                                      • If 'true', the input type will be '@oneOf' type. More info about '@oneOf' types in the [GraphQL spec](https://spec.graphql.org/September2025/#sec-OneOf-Input-Objects).

                                                                                                                                                                                                                                                                                                                                      property registerIn

                                                                                                                                                                                                                                                                                                                                      registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                                                                                                      • NestJS module that this type belongs to. When specified, this type will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                        • RegisterInOption for details

                                                                                                                                                                                                                                                                                                                                      interface InterfaceTypeOptions

                                                                                                                                                                                                                                                                                                                                      interface InterfaceTypeOptions {}
                                                                                                                                                                                                                                                                                                                                      • Interface defining options that can be passed to @InterfaceType() decorator.

                                                                                                                                                                                                                                                                                                                                      property description

                                                                                                                                                                                                                                                                                                                                      description?: string;
                                                                                                                                                                                                                                                                                                                                      • Description of the argument.

                                                                                                                                                                                                                                                                                                                                      property implements

                                                                                                                                                                                                                                                                                                                                      implements?: Function | Function[] | (() => Function | Function[]);
                                                                                                                                                                                                                                                                                                                                      • Interfaces implemented by this interface.

                                                                                                                                                                                                                                                                                                                                      property isAbstract

                                                                                                                                                                                                                                                                                                                                      isAbstract?: boolean;
                                                                                                                                                                                                                                                                                                                                      • If true, type will not be registered in the schema.

                                                                                                                                                                                                                                                                                                                                      property registerIn

                                                                                                                                                                                                                                                                                                                                      registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                                                                                                      • NestJS module that this type belongs to. When specified, this type will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                        • RegisterInOption for details

                                                                                                                                                                                                                                                                                                                                      property resolveType

                                                                                                                                                                                                                                                                                                                                      resolveType?: ResolveTypeFn<any, any>;
                                                                                                                                                                                                                                                                                                                                      • Custom implementation of the "resolveType" function.

                                                                                                                                                                                                                                                                                                                                      interface MiddlewareContext

                                                                                                                                                                                                                                                                                                                                      interface MiddlewareContext<
                                                                                                                                                                                                                                                                                                                                      TSource = any,
                                                                                                                                                                                                                                                                                                                                      TContext = any,
                                                                                                                                                                                                                                                                                                                                      TArgs = {
                                                                                                                                                                                                                                                                                                                                      [argName: string]: any;
                                                                                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                                                                                      > {}

                                                                                                                                                                                                                                                                                                                                        property args

                                                                                                                                                                                                                                                                                                                                        args: TArgs;

                                                                                                                                                                                                                                                                                                                                          property context

                                                                                                                                                                                                                                                                                                                                          context: TContext;

                                                                                                                                                                                                                                                                                                                                            property info

                                                                                                                                                                                                                                                                                                                                            info?: GraphQLResolveInfo | null;

                                                                                                                                                                                                                                                                                                                                              property source

                                                                                                                                                                                                                                                                                                                                              source: TSource;

                                                                                                                                                                                                                                                                                                                                                interface ObjectTypeOptions

                                                                                                                                                                                                                                                                                                                                                interface ObjectTypeOptions {}
                                                                                                                                                                                                                                                                                                                                                • Interface defining options that can be passed to @ObjectType() decorator

                                                                                                                                                                                                                                                                                                                                                property description

                                                                                                                                                                                                                                                                                                                                                description?: string;
                                                                                                                                                                                                                                                                                                                                                • Description of the input type.

                                                                                                                                                                                                                                                                                                                                                property implements

                                                                                                                                                                                                                                                                                                                                                implements?: Function | Function[] | (() => Function | Function[]);
                                                                                                                                                                                                                                                                                                                                                • Interfaces implemented by this object type.

                                                                                                                                                                                                                                                                                                                                                property inheritDescription

                                                                                                                                                                                                                                                                                                                                                inheritDescription?: boolean;
                                                                                                                                                                                                                                                                                                                                                • If true, direct descendant classes will inherit the parent's description if own description is not set. Also works on classes marked with isAbstract: true.

                                                                                                                                                                                                                                                                                                                                                property isAbstract

                                                                                                                                                                                                                                                                                                                                                isAbstract?: boolean;
                                                                                                                                                                                                                                                                                                                                                • If true, type will not be registered in the schema.

                                                                                                                                                                                                                                                                                                                                                property registerIn

                                                                                                                                                                                                                                                                                                                                                registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                                                                                                                • NestJS module that this type belongs to. When specified, this type will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                                                                                                                  See Also

                                                                                                                                                                                                                                                                                                                                                  • RegisterInOption for details

                                                                                                                                                                                                                                                                                                                                                interface PropertyMetadata

                                                                                                                                                                                                                                                                                                                                                interface PropertyMetadata {}

                                                                                                                                                                                                                                                                                                                                                  property complexity

                                                                                                                                                                                                                                                                                                                                                  complexity?: Complexity;

                                                                                                                                                                                                                                                                                                                                                    property deprecationReason

                                                                                                                                                                                                                                                                                                                                                    deprecationReason?: string;

                                                                                                                                                                                                                                                                                                                                                      property description

                                                                                                                                                                                                                                                                                                                                                      description?: string;

                                                                                                                                                                                                                                                                                                                                                        property directives

                                                                                                                                                                                                                                                                                                                                                        directives?: DirectiveMetadata[];

                                                                                                                                                                                                                                                                                                                                                          property extensions

                                                                                                                                                                                                                                                                                                                                                          extensions?: Record<string, unknown>;

                                                                                                                                                                                                                                                                                                                                                            property methodArgs

                                                                                                                                                                                                                                                                                                                                                            methodArgs?: MethodArgsMetadata[];

                                                                                                                                                                                                                                                                                                                                                              property middleware

                                                                                                                                                                                                                                                                                                                                                              middleware?: FieldMiddleware[];

                                                                                                                                                                                                                                                                                                                                                                property name

                                                                                                                                                                                                                                                                                                                                                                name: string;

                                                                                                                                                                                                                                                                                                                                                                  property options

                                                                                                                                                                                                                                                                                                                                                                  options: TypeOptions;

                                                                                                                                                                                                                                                                                                                                                                    property schemaName

                                                                                                                                                                                                                                                                                                                                                                    schemaName: string;

                                                                                                                                                                                                                                                                                                                                                                      property target

                                                                                                                                                                                                                                                                                                                                                                      target: Function;

                                                                                                                                                                                                                                                                                                                                                                        property typeFn

                                                                                                                                                                                                                                                                                                                                                                        typeFn: () => GqlTypeReference;

                                                                                                                                                                                                                                                                                                                                                                          interface ResolverOptions

                                                                                                                                                                                                                                                                                                                                                                          interface ResolverOptions {}
                                                                                                                                                                                                                                                                                                                                                                          • Interface defining options that can be passed to @Resolve() decorator

                                                                                                                                                                                                                                                                                                                                                                          property isAbstract

                                                                                                                                                                                                                                                                                                                                                                          isAbstract?: boolean;
                                                                                                                                                                                                                                                                                                                                                                          • If true, type will not be registered in the schema.

                                                                                                                                                                                                                                                                                                                                                                          interface ScalarsTypeMap

                                                                                                                                                                                                                                                                                                                                                                          interface ScalarsTypeMap {}

                                                                                                                                                                                                                                                                                                                                                                            property scalar

                                                                                                                                                                                                                                                                                                                                                                            scalar: GraphQLScalarType;

                                                                                                                                                                                                                                                                                                                                                                              property type

                                                                                                                                                                                                                                                                                                                                                                              type: Function;

                                                                                                                                                                                                                                                                                                                                                                                interface SchemaFileConfig

                                                                                                                                                                                                                                                                                                                                                                                interface SchemaFileConfig {}

                                                                                                                                                                                                                                                                                                                                                                                  property federation

                                                                                                                                                                                                                                                                                                                                                                                  federation?: FederationVersion | FederationConfig;
                                                                                                                                                                                                                                                                                                                                                                                  • Federation version and its configuration,

                                                                                                                                                                                                                                                                                                                                                                                    1

                                                                                                                                                                                                                                                                                                                                                                                  property path

                                                                                                                                                                                                                                                                                                                                                                                  path?: string;
                                                                                                                                                                                                                                                                                                                                                                                  • Path to the schema file.

                                                                                                                                                                                                                                                                                                                                                                                  interface UnionOptions

                                                                                                                                                                                                                                                                                                                                                                                  interface UnionOptions<T extends readonly Type<unknown>[] = Type<unknown>[]> {}
                                                                                                                                                                                                                                                                                                                                                                                  • Interface defining options that can be passed to createUnionType function.

                                                                                                                                                                                                                                                                                                                                                                                  property description

                                                                                                                                                                                                                                                                                                                                                                                  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                  • Description of the union.

                                                                                                                                                                                                                                                                                                                                                                                  property directives

                                                                                                                                                                                                                                                                                                                                                                                  directives?: string[];
                                                                                                                                                                                                                                                                                                                                                                                  • An array of directive SDL strings (e.g. ['@tag(name: "internal")']) to be applied on the generated union type.

                                                                                                                                                                                                                                                                                                                                                                                  property name

                                                                                                                                                                                                                                                                                                                                                                                  name?: string;
                                                                                                                                                                                                                                                                                                                                                                                  • Name of the union.

                                                                                                                                                                                                                                                                                                                                                                                  property registerIn

                                                                                                                                                                                                                                                                                                                                                                                  registerIn?: RegisterInOption;
                                                                                                                                                                                                                                                                                                                                                                                  • NestJS module that this union belongs to. When specified, this union will only be included in GraphQL schemas that include this module via the include option.

                                                                                                                                                                                                                                                                                                                                                                                    See Also

                                                                                                                                                                                                                                                                                                                                                                                    • RegisterInOption for details

                                                                                                                                                                                                                                                                                                                                                                                  property resolveType

                                                                                                                                                                                                                                                                                                                                                                                  resolveType?: ResolveTypeFn<any, any>;
                                                                                                                                                                                                                                                                                                                                                                                  • Custom implementation of the "resolveType" function.

                                                                                                                                                                                                                                                                                                                                                                                  property types

                                                                                                                                                                                                                                                                                                                                                                                  types: () => T;
                                                                                                                                                                                                                                                                                                                                                                                  • Types that the union consist of.

                                                                                                                                                                                                                                                                                                                                                                                  Type Aliases

                                                                                                                                                                                                                                                                                                                                                                                  type ArgsOptions

                                                                                                                                                                                                                                                                                                                                                                                  type ArgsOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                  * Name of the argument.
                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                  name?: string;
                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                  * Description of the argument.
                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                  * Argument deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                  deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                  * Function that returns a reference to the arguments host class.
                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                  type?: () => any;
                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                  • Interface defining options that can be passed to @Args() decorator.

                                                                                                                                                                                                                                                                                                                                                                                  type ArrayElement

                                                                                                                                                                                                                                                                                                                                                                                  type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType[number];

                                                                                                                                                                                                                                                                                                                                                                                    type AutoSchemaFileValue

                                                                                                                                                                                                                                                                                                                                                                                    type AutoSchemaFileValue = boolean | string | SchemaFileConfig;

                                                                                                                                                                                                                                                                                                                                                                                      type BaseTypeOptions

                                                                                                                                                                                                                                                                                                                                                                                      type BaseTypeOptions<T = any> = NonNullableBaseType<T> | NullableBaseType<T>;

                                                                                                                                                                                                                                                                                                                                                                                        type Complexity

                                                                                                                                                                                                                                                                                                                                                                                        type Complexity = ComplexityEstimator | number;

                                                                                                                                                                                                                                                                                                                                                                                          type ComplexityEstimator

                                                                                                                                                                                                                                                                                                                                                                                          type ComplexityEstimator = (options: ComplexityEstimatorArgs) => number | void;

                                                                                                                                                                                                                                                                                                                                                                                            type ComplexityEstimatorArgs

                                                                                                                                                                                                                                                                                                                                                                                            type ComplexityEstimatorArgs = {
                                                                                                                                                                                                                                                                                                                                                                                            type: GraphQLCompositeType;
                                                                                                                                                                                                                                                                                                                                                                                            field: GraphQLField<any, any>;
                                                                                                                                                                                                                                                                                                                                                                                            args: {
                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: any;
                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                            childComplexity: number;
                                                                                                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                                                                                                              type DateScalarMode

                                                                                                                                                                                                                                                                                                                                                                                              type DateScalarMode = 'isoDate' | 'timestamp';

                                                                                                                                                                                                                                                                                                                                                                                                type Enhancer

                                                                                                                                                                                                                                                                                                                                                                                                type Enhancer = 'guards' | 'interceptors' | 'filters';

                                                                                                                                                                                                                                                                                                                                                                                                  type FederationConfig

                                                                                                                                                                                                                                                                                                                                                                                                  type FederationConfig = Federation2Config;

                                                                                                                                                                                                                                                                                                                                                                                                    type FederationVersion

                                                                                                                                                                                                                                                                                                                                                                                                    type FederationVersion = 1 | 2;

                                                                                                                                                                                                                                                                                                                                                                                                      type FieldOptions

                                                                                                                                                                                                                                                                                                                                                                                                      type FieldOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                      * Name of the field.
                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                      name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                      * Description of the field.
                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                      description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                      * Field deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                      deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                      * Field complexity options.
                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                      complexity?: Complexity;
                                                                                                                                                                                                                                                                                                                                                                                                      /**
                                                                                                                                                                                                                                                                                                                                                                                                      * Array of middleware to apply.
                                                                                                                                                                                                                                                                                                                                                                                                      */
                                                                                                                                                                                                                                                                                                                                                                                                      middleware?: FieldMiddleware[];
                                                                                                                                                                                                                                                                                                                                                                                                      };
                                                                                                                                                                                                                                                                                                                                                                                                      • Interface defining options that can be passed to @Field() decorator.

                                                                                                                                                                                                                                                                                                                                                                                                      type FieldType

                                                                                                                                                                                                                                                                                                                                                                                                      type FieldType<T> = T;

                                                                                                                                                                                                                                                                                                                                                                                                        type GenerateOptions

                                                                                                                                                                                                                                                                                                                                                                                                        type GenerateOptions = DefinitionsGeneratorOptions & {
                                                                                                                                                                                                                                                                                                                                                                                                        typePaths: string[];
                                                                                                                                                                                                                                                                                                                                                                                                        path: string;
                                                                                                                                                                                                                                                                                                                                                                                                        outputAs?: 'class' | 'interface';
                                                                                                                                                                                                                                                                                                                                                                                                        watch?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        debug?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        typeDefs?: string | string[];
                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                          type GqlContextType

                                                                                                                                                                                                                                                                                                                                                                                                          type GqlContextType = 'graphql' | ContextType;

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlRequestEndHook

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlRequestEndHook = (context: GqlRequestEndHookContext) => void | Promise<void>;

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlRequestStartHook

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlRequestStartHook = (context: GqlRequestStartHookContext) => unknown;

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlTypeReference

                                                                                                                                                                                                                                                                                                                                                                                                            type GqlTypeReference<T = any> =
                                                                                                                                                                                                                                                                                                                                                                                                            | Type<T>
                                                                                                                                                                                                                                                                                                                                                                                                            | GraphQLScalarType
                                                                                                                                                                                                                                                                                                                                                                                                            | Function
                                                                                                                                                                                                                                                                                                                                                                                                            | object
                                                                                                                                                                                                                                                                                                                                                                                                            | symbol
                                                                                                                                                                                                                                                                                                                                                                                                            | string;

                                                                                                                                                                                                                                                                                                                                                                                                              type GraphQLExecutionContext

                                                                                                                                                                                                                                                                                                                                                                                                              type GraphQLExecutionContext = GqlExecutionContext;

                                                                                                                                                                                                                                                                                                                                                                                                                type GraphQLWsSubscriptionsConfig

                                                                                                                                                                                                                                                                                                                                                                                                                type GraphQLWsSubscriptionsConfig = Partial<
                                                                                                                                                                                                                                                                                                                                                                                                                Pick<
                                                                                                                                                                                                                                                                                                                                                                                                                ServerOptions,
                                                                                                                                                                                                                                                                                                                                                                                                                | 'connectionInitWaitTimeout'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onConnect'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onDisconnect'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onClose'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onSubscribe'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onNext'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'onError'
                                                                                                                                                                                                                                                                                                                                                                                                                | 'validate'
                                                                                                                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                                                                                                                > & {
                                                                                                                                                                                                                                                                                                                                                                                                                path?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                * A `ws` WebSocketServer to use instead of the default one, e.g. to set
                                                                                                                                                                                                                                                                                                                                                                                                                * `perMessageDeflate`, `maxPayload` or `verifyClient`.
                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                * It must be created with `{ noServer: true }`: Nest routes the HTTP
                                                                                                                                                                                                                                                                                                                                                                                                                * upgrade requests to it. Its `path`, when set, takes precedence over
                                                                                                                                                                                                                                                                                                                                                                                                                * `path` above and the GraphQL module path.
                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                * The server is handed over to graphql-ws, which replaces its
                                                                                                                                                                                                                                                                                                                                                                                                                * `handleProtocols` option and, on application shutdown, closes it and
                                                                                                                                                                                                                                                                                                                                                                                                                * removes all of its listeners. Use a separate server per GraphQL module.
                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                server?: GraphQLWsServer;
                                                                                                                                                                                                                                                                                                                                                                                                                /**
                                                                                                                                                                                                                                                                                                                                                                                                                * How many milliseconds an upgrade request for another path is left open
                                                                                                                                                                                                                                                                                                                                                                                                                * when another `upgrade` listener on the same server may claim it. A socket
                                                                                                                                                                                                                                                                                                                                                                                                                * that nothing has been written to by then is closed. Raise it when another
                                                                                                                                                                                                                                                                                                                                                                                                                * listener answers the handshake late, for example after a slow
                                                                                                                                                                                                                                                                                                                                                                                                                * authentication, or set it to `0` to leave such sockets to the other
                                                                                                                                                                                                                                                                                                                                                                                                                * listeners entirely.
                                                                                                                                                                                                                                                                                                                                                                                                                *
                                                                                                                                                                                                                                                                                                                                                                                                                * @default 1000
                                                                                                                                                                                                                                                                                                                                                                                                                */
                                                                                                                                                                                                                                                                                                                                                                                                                unclaimedUpgradeTimeout?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                  type MutationOptions

                                                                                                                                                                                                                                                                                                                                                                                                                  type MutationOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                  * Name of the mutation.
                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                  name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                  * Description of the mutation.
                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                  * Mutation deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                  deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                  * Mutation complexity options.
                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                  complexity?: Complexity;
                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                  • Interface defining options that can be passed to @Mutation() decorator.

                                                                                                                                                                                                                                                                                                                                                                                                                  type NextFn

                                                                                                                                                                                                                                                                                                                                                                                                                  type NextFn<T = any> = () => Promise<T>;

                                                                                                                                                                                                                                                                                                                                                                                                                    type NullableList

                                                                                                                                                                                                                                                                                                                                                                                                                    type NullableList = 'items' | 'itemsAndList';

                                                                                                                                                                                                                                                                                                                                                                                                                      type NumberScalarMode

                                                                                                                                                                                                                                                                                                                                                                                                                      type NumberScalarMode = 'float' | 'integer';

                                                                                                                                                                                                                                                                                                                                                                                                                        type QueryOptions

                                                                                                                                                                                                                                                                                                                                                                                                                        type QueryOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Name of the query.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Description of the query.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Query deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Query complexity options.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        complexity?: Complexity;
                                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                                        • Interface defining options that can be passed to @Query() decorator.

                                                                                                                                                                                                                                                                                                                                                                                                                        type ResolveFieldOptions

                                                                                                                                                                                                                                                                                                                                                                                                                        type ResolveFieldOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Name of the field.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Description of the field.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Field deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Field complexity options.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        complexity?: Complexity;
                                                                                                                                                                                                                                                                                                                                                                                                                        /**
                                                                                                                                                                                                                                                                                                                                                                                                                        * Array of middleware to apply.
                                                                                                                                                                                                                                                                                                                                                                                                                        */
                                                                                                                                                                                                                                                                                                                                                                                                                        middleware?: FieldMiddleware[];
                                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                                        • Interface defining options that can be passed to @ResolveField() decorator.

                                                                                                                                                                                                                                                                                                                                                                                                                        type ResolverTypeFn

                                                                                                                                                                                                                                                                                                                                                                                                                        type ResolverTypeFn = (of?: void) => Function;

                                                                                                                                                                                                                                                                                                                                                                                                                          type ResolveTypeFn

                                                                                                                                                                                                                                                                                                                                                                                                                          type ResolveTypeFn<TSource = any, TContext = any> = (
                                                                                                                                                                                                                                                                                                                                                                                                                          ...args: Parameters<GraphQLTypeResolver<TSource, TContext>>
                                                                                                                                                                                                                                                                                                                                                                                                                          ) => any;

                                                                                                                                                                                                                                                                                                                                                                                                                            type ReturnTypeFunc

                                                                                                                                                                                                                                                                                                                                                                                                                            type ReturnTypeFunc<T extends ReturnTypeFuncValue = any> = (returns?: void) => T;

                                                                                                                                                                                                                                                                                                                                                                                                                              type ReturnTypeFuncValue

                                                                                                                                                                                                                                                                                                                                                                                                                              type ReturnTypeFuncValue = GqlTypeReference | [GqlTypeReference];

                                                                                                                                                                                                                                                                                                                                                                                                                                type SubscriptionConfig

                                                                                                                                                                                                                                                                                                                                                                                                                                type SubscriptionConfig = {
                                                                                                                                                                                                                                                                                                                                                                                                                                'graphql-ws'?: GraphQLWsSubscriptionsConfig | boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                  type SubscriptionOptions

                                                                                                                                                                                                                                                                                                                                                                                                                                  type SubscriptionOptions<T = any> = BaseTypeOptions<T> & {
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * Name of the subscription.
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  name?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * Description of the subscription.
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  description?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * Subscription deprecation reason (if deprecated).
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  deprecationReason?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * Filter messages function.
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  filter?: (
                                                                                                                                                                                                                                                                                                                                                                                                                                  payload: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                  variables: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                  context: any
                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => boolean | Promise<boolean>;
                                                                                                                                                                                                                                                                                                                                                                                                                                  /**
                                                                                                                                                                                                                                                                                                                                                                                                                                  * Resolve messages function (to transform payload/message shape).
                                                                                                                                                                                                                                                                                                                                                                                                                                  */
                                                                                                                                                                                                                                                                                                                                                                                                                                  resolve?: (
                                                                                                                                                                                                                                                                                                                                                                                                                                  payload: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                  args: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                  context: any,
                                                                                                                                                                                                                                                                                                                                                                                                                                  info: any
                                                                                                                                                                                                                                                                                                                                                                                                                                  ) => any | Promise<any>;
                                                                                                                                                                                                                                                                                                                                                                                                                                  };
                                                                                                                                                                                                                                                                                                                                                                                                                                  • Interface defining options that can be passed to @Subscription() decorator.

                                                                                                                                                                                                                                                                                                                                                                                                                                  type Union

                                                                                                                                                                                                                                                                                                                                                                                                                                  type Union<T extends readonly any[]> = InstanceType<ArrayElement<T>>;

                                                                                                                                                                                                                                                                                                                                                                                                                                    Package Files (70)

                                                                                                                                                                                                                                                                                                                                                                                                                                    Dependencies (12)

                                                                                                                                                                                                                                                                                                                                                                                                                                    Dev Dependencies (7)

                                                                                                                                                                                                                                                                                                                                                                                                                                    Peer Dependencies (9)

                                                                                                                                                                                                                                                                                                                                                                                                                                    Badge

                                                                                                                                                                                                                                                                                                                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nestjs/graphql.

                                                                                                                                                                                                                                                                                                                                                                                                                                    • Markdown
                                                                                                                                                                                                                                                                                                                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@nestjs/graphql)
                                                                                                                                                                                                                                                                                                                                                                                                                                    • HTML
                                                                                                                                                                                                                                                                                                                                                                                                                                      <a href="https://www.jsdocs.io/package/@nestjs/graphql"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>