@nestjs/graphql

  • Version 10.0.10
  • Published
  • 474 kB
  • 14 dependencies
  • MIT license

Install

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

Overview

Nest - modern, fast, powerful node.js web framework (@graphql)

Index

Variables

Functions

Classes

Interfaces

Type Aliases

Variables

variable CONTEXT

const CONTEXT: string;

    variable Float

    const Float: any;

      variable GraphQLISODateTime

      const GraphQLISODateTime: GraphQLScalarType;

        variable GraphQLTimestamp

        const GraphQLTimestamp: GraphQLScalarType;

          variable ID

          const ID: any;

            variable Int

            const Int: any;

              variable TypeMetadataStorage

              const TypeMetadataStorage: TypeMetadataStorageHost;

                Functions

                function addFieldMetadata

                addFieldMetadata: (
                typeOrOptions: ReturnTypeFunc | FieldOptions,
                fieldOptions: FieldOptions,
                prototype: Object,
                propertyKey?: string,
                descriptor?: TypedPropertyDescriptor<any>,
                loadEagerly?: boolean
                ) => void;

                  function Args

                  Args: {
                  (): ParameterDecorator;
                  (...pipes: any[]): ParameterDecorator;
                  (property: string, ...pipes: any[]): ParameterDecorator;
                  (options: ArgsOptions, ...pipes: any[]): ParameterDecorator;
                  (property: string, options: ArgsOptions, ...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;
                  • Decorator that marks a class as a resolver arguments type.

                  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) => MethodDecorator & PropertyDecorator & ClassDecorator;
                  • Adds a directive to specified field, type, or handler.

                  function extend

                  extend: (obj1: unknown, obj2: unknown) => any;

                    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;
                    (options: FieldOptions): PropertyDecorator & MethodDecorator;
                    (
                    returnTypeFunction?: ReturnTypeFunc,
                    options?: FieldOptions
                    ): 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 HideField

                    HideField: () => PropertyDecorator;

                      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, options?: MutationOptions): 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>,
                          decorator?: ClassDecoratorFactory
                          ) => 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, options?: QueryOptions): 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: {
                              (typeFunc?: ReturnTypeFunc, options?: ResolveFieldOptions): MethodDecorator;
                              (
                              propertyName?: string,
                              typeFunc?: ReturnTypeFunc,
                              options?: ResolveFieldOptions
                              ): MethodDecorator;
                              };
                              • Field resolver (method) Decorator.

                              • Property resolver (method) Decorator.

                              function ResolveProperty

                              ResolveProperty: {
                              (typeFunc?: ReturnTypeFunc, options?: ResolveFieldOptions): MethodDecorator;
                              (
                              propertyName?: string,
                              typeFunc?: ReturnTypeFunc,
                              options?: ResolveFieldOptions
                              ): 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): ClassDecorator;
                              };
                              • Decorator that marks a class as a GraphQL scalar.

                              function Subscription

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

                              function transformSchema

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

                                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;

                                        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;

                                                  class BaseExplorerService

                                                  class BaseExplorerService {}

                                                    method flatMap

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

                                                      method getModules

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

                                                        method groupMetadata

                                                        groupMetadata: (resolvers: ResolverMetadata[]) => any;

                                                          method includeWhitelisted

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

                                                            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 addClassOrInterface

                                                                                              addClassOrInterface: (
                                                                                              tsFile: SourceFile,
                                                                                              mode: 'class' | 'interface',
                                                                                              options: InterfaceDeclarationStructure | ClassDeclarationStructure
                                                                                              ) => InterfaceDeclaration | ClassDeclaration;

                                                                                                method addEnumDefinition

                                                                                                addEnumDefinition: (
                                                                                                item: EnumTypeDefinitionNode | EnumTypeExtensionNode,
                                                                                                tsFile: SourceFile,
                                                                                                options: DefinitionsGeneratorOptions
                                                                                                ) => any;

                                                                                                  method addExtendInterfaces

                                                                                                  addExtendInterfaces: (
                                                                                                  interfaces: NamedTypeNode[],
                                                                                                  parentRef: InterfaceDeclaration
                                                                                                  ) => void;

                                                                                                    method addImplementsInterfaces

                                                                                                    addImplementsInterfaces: (
                                                                                                    interfaces: NamedTypeNode[],
                                                                                                    parentRef: ClassDeclaration
                                                                                                    ) => void;

                                                                                                      method addObjectTypeDefinition

                                                                                                      addObjectTypeDefinition: (
                                                                                                      item:
                                                                                                      | ObjectTypeDefinitionNode
                                                                                                      | ObjectTypeExtensionNode
                                                                                                      | InputObjectTypeDefinitionNode
                                                                                                      | InputObjectTypeExtensionNode
                                                                                                      | InterfaceTypeDefinitionNode
                                                                                                      | InterfaceTypeExtensionNode,
                                                                                                      tsFile: SourceFile,
                                                                                                      mode: 'class' | 'interface',
                                                                                                      options: DefinitionsGeneratorOptions
                                                                                                      ) => void;

                                                                                                        method addScalarDefinition

                                                                                                        addScalarDefinition: (
                                                                                                        item: ScalarTypeDefinitionNode | ScalarTypeExtensionNode,
                                                                                                        tsFile: SourceFile,
                                                                                                        options: DefinitionsGeneratorOptions
                                                                                                        ) => void;

                                                                                                          method addSymbolIfRoot

                                                                                                          addSymbolIfRoot: (name: string) => string;

                                                                                                            method addUnionDefinition

                                                                                                            addUnionDefinition: (
                                                                                                            item: UnionTypeDefinitionNode | UnionTypeExtensionNode,
                                                                                                            tsFile: SourceFile
                                                                                                            ) => void;

                                                                                                              method explore

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

                                                                                                                method getClassOrInterface

                                                                                                                getClassOrInterface: (
                                                                                                                tsFile: SourceFile,
                                                                                                                mode: 'class' | 'interface',
                                                                                                                name: string
                                                                                                                ) => InterfaceDeclaration | ClassDeclaration;

                                                                                                                  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 lookupDefinition

                                                                                                                            lookupDefinition: (
                                                                                                                            item: Readonly<TypeSystemDefinitionNode | TypeSystemExtensionNode>,
                                                                                                                            tsFile: SourceFile,
                                                                                                                            mode: 'class' | 'interface',
                                                                                                                            options: DefinitionsGeneratorOptions
                                                                                                                            ) => void | import('ts-morph').TypeAliasDeclaration;

                                                                                                                              method lookupField

                                                                                                                              lookupField: (
                                                                                                                              item: FieldDefinitionNode | InputValueDefinitionNode,
                                                                                                                              parentRef: InterfaceDeclaration | ClassDeclaration,
                                                                                                                              mode: 'class' | 'interface',
                                                                                                                              options: DefinitionsGeneratorOptions
                                                                                                                              ) => void;

                                                                                                                                method lookupFieldDefiniton

                                                                                                                                lookupFieldDefiniton: (
                                                                                                                                item: FieldDefinitionNode | InputValueDefinitionNode,
                                                                                                                                parentRef: InterfaceDeclaration | ClassDeclaration,
                                                                                                                                mode: 'class' | 'interface',
                                                                                                                                options: DefinitionsGeneratorOptions
                                                                                                                                ) => void;

                                                                                                                                  method lookupRootSchemaDefinition

                                                                                                                                  lookupRootSchemaDefinition: (
                                                                                                                                  operationTypes: ReadonlyArray<OperationTypeDefinitionNode>,
                                                                                                                                  tsFile: SourceFile,
                                                                                                                                  mode: 'class' | 'interface'
                                                                                                                                  ) => void;

                                                                                                                                    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,
                                                                                                                                                    gqlSchemaHost: GraphQLSchemaHost
                                                                                                                                                    );

                                                                                                                                                      method generateDefinitions

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

                                                                                                                                                        method mergeWithSchema

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

                                                                                                                                                          method overrideOrExtendResolvers

                                                                                                                                                          overrideOrExtendResolvers: (
                                                                                                                                                          executableSchemaConfig: GraphQLSchemaConfig,
                                                                                                                                                          autoGeneratedSchemaConfig: GraphQLSchemaConfig
                                                                                                                                                          ) => GraphQLSchemaConfig;

                                                                                                                                                            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,
                                                                                                                                                                  gqlSchemaHost: GraphQLSchemaHost
                                                                                                                                                                  );

                                                                                                                                                                    method buildFederatedSchema

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

                                                                                                                                                                      method mergeWithSchema

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

                                                                                                                                                                        class GraphQLModule

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

                                                                                                                                                                          constructor

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

                                                                                                                                                                            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 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>;

                                                                                                                                                                                                      Interfaces

                                                                                                                                                                                                      interface ArgsOptions

                                                                                                                                                                                                      interface ArgsOptions extends BaseTypeOptions {}
                                                                                                                                                                                                      • Interface defining options that can be passed to @Args() decorator.

                                                                                                                                                                                                      property description

                                                                                                                                                                                                      description?: string;
                                                                                                                                                                                                      • Description of the argument.

                                                                                                                                                                                                      property name

                                                                                                                                                                                                      name?: string;
                                                                                                                                                                                                      • Name of the argument.

                                                                                                                                                                                                      property type

                                                                                                                                                                                                      type?: () => any;
                                                                                                                                                                                                      • Function that returns a reference to the arguments host class.

                                                                                                                                                                                                      interface BaseTypeOptions

                                                                                                                                                                                                      interface BaseTypeOptions {}

                                                                                                                                                                                                        property defaultValue

                                                                                                                                                                                                        defaultValue?: any;
                                                                                                                                                                                                        • Default value.

                                                                                                                                                                                                        property nullable

                                                                                                                                                                                                        nullable?: boolean | NullableList;
                                                                                                                                                                                                        • Determines whether field/argument/etc is nullable.

                                                                                                                                                                                                        interface BuildFederatedSchemaOptions

                                                                                                                                                                                                        interface BuildFederatedSchemaOptions {}

                                                                                                                                                                                                          property resolvers

                                                                                                                                                                                                          resolvers: any;

                                                                                                                                                                                                            property typeDefs

                                                                                                                                                                                                            typeDefs: DocumentNode;

                                                                                                                                                                                                              interface BuildSchemaOptions

                                                                                                                                                                                                              interface BuildSchemaOptions {}

                                                                                                                                                                                                                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 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 parseLiteral

                                                                                                                                                                                                                    parseLiteral: GraphQLScalarLiteralParser<K>;

                                                                                                                                                                                                                      property parseValue

                                                                                                                                                                                                                      parseValue: GraphQLScalarValueParser<K>;

                                                                                                                                                                                                                        property serialize

                                                                                                                                                                                                                        serialize: GraphQLScalarSerializer<T>;

                                                                                                                                                                                                                          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' | 'Boolean' | 'Float' | 'String' | 'Int', string>
                                                                                                                                                                                                                            >;
                                                                                                                                                                                                                            • If provided, specifies a mapping of default scalar types (Int, Boolean, ID, Float, String). undefined

                                                                                                                                                                                                                            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

                                                                                                                                                                                                                            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 name

                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                            • Name of the enum.

                                                                                                                                                                                                                            property valuesMap

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

                                                                                                                                                                                                                            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 FieldOptions

                                                                                                                                                                                                                                interface FieldOptions extends BaseTypeOptions {}
                                                                                                                                                                                                                                • Interface defining options that can be passed to @Field() decorator.

                                                                                                                                                                                                                                property complexity

                                                                                                                                                                                                                                complexity?: Complexity;
                                                                                                                                                                                                                                • Field complexity options.

                                                                                                                                                                                                                                property deprecationReason

                                                                                                                                                                                                                                deprecationReason?: string;
                                                                                                                                                                                                                                • Field deprecation reason (if deprecated).

                                                                                                                                                                                                                                property description

                                                                                                                                                                                                                                description?: string;
                                                                                                                                                                                                                                • Description of the field.

                                                                                                                                                                                                                                property middleware

                                                                                                                                                                                                                                middleware?: FieldMiddleware[];
                                                                                                                                                                                                                                • Array of middleware to apply.

                                                                                                                                                                                                                                property name

                                                                                                                                                                                                                                name?: string;
                                                                                                                                                                                                                                • Name of the field.

                                                                                                                                                                                                                                interface GqlExceptionFilter

                                                                                                                                                                                                                                interface GqlExceptionFilter<TInput = any, TOutput = any> {}

                                                                                                                                                                                                                                  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?: string | boolean;
                                                                                                                                                                                                                                              • 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 definitions

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

                                                                                                                                                                                                                                              property directiveResolvers

                                                                                                                                                                                                                                              directiveResolvers?: any;
                                                                                                                                                                                                                                              • Directive resolvers

                                                                                                                                                                                                                                              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 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 transformAutoSchemaFile

                                                                                                                                                                                                                                              transformAutoSchemaFile?: boolean;
                                                                                                                                                                                                                                              • Apply transformSchema to the autoSchemaFile

                                                                                                                                                                                                                                              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 GqlSubscriptionServiceOptions

                                                                                                                                                                                                                                                  interface GqlSubscriptionServiceOptions extends SubscriptionConfig {}

                                                                                                                                                                                                                                                    property context

                                                                                                                                                                                                                                                    context?: ServerOptions['context'];

                                                                                                                                                                                                                                                      property path

                                                                                                                                                                                                                                                      path?: string;

                                                                                                                                                                                                                                                        property schema

                                                                                                                                                                                                                                                        schema: GraphQLSchema;

                                                                                                                                                                                                                                                          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 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.

                                                                                                                                                                                                                                                                          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 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;

                                                                                                                                                                                                                                                                                  property source

                                                                                                                                                                                                                                                                                  source: TSource;

                                                                                                                                                                                                                                                                                    interface MutationOptions

                                                                                                                                                                                                                                                                                    interface MutationOptions extends BaseTypeOptions {}
                                                                                                                                                                                                                                                                                    • Interface defining options that can be passed to @Mutation() decorator.

                                                                                                                                                                                                                                                                                    property complexity

                                                                                                                                                                                                                                                                                    complexity?: Complexity;
                                                                                                                                                                                                                                                                                    • Mutation complexity options.

                                                                                                                                                                                                                                                                                    property deprecationReason

                                                                                                                                                                                                                                                                                    deprecationReason?: string;
                                                                                                                                                                                                                                                                                    • Mutation deprecation reason (if deprecated).

                                                                                                                                                                                                                                                                                    property description

                                                                                                                                                                                                                                                                                    description?: string;
                                                                                                                                                                                                                                                                                    • Description of the mutation.

                                                                                                                                                                                                                                                                                    property name

                                                                                                                                                                                                                                                                                    name?: string;
                                                                                                                                                                                                                                                                                    • Name of the mutation.

                                                                                                                                                                                                                                                                                    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 isAbstract

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

                                                                                                                                                                                                                                                                                    interface QueryOptions

                                                                                                                                                                                                                                                                                    interface QueryOptions extends BaseTypeOptions {}
                                                                                                                                                                                                                                                                                    • Interface defining options that can be passed to @Query() decorator.

                                                                                                                                                                                                                                                                                    property complexity

                                                                                                                                                                                                                                                                                    complexity?: Complexity;
                                                                                                                                                                                                                                                                                    • Query complexity options.

                                                                                                                                                                                                                                                                                    property deprecationReason

                                                                                                                                                                                                                                                                                    deprecationReason?: string;
                                                                                                                                                                                                                                                                                    • Query deprecation reason (if deprecated).

                                                                                                                                                                                                                                                                                    property description

                                                                                                                                                                                                                                                                                    description?: string;
                                                                                                                                                                                                                                                                                    • Description of the query.

                                                                                                                                                                                                                                                                                    property name

                                                                                                                                                                                                                                                                                    name?: string;
                                                                                                                                                                                                                                                                                    • Name of the query.

                                                                                                                                                                                                                                                                                    interface ResolveFieldOptions

                                                                                                                                                                                                                                                                                    interface ResolveFieldOptions extends BaseTypeOptions {}
                                                                                                                                                                                                                                                                                    • Interface defining options that can be passed to @ResolveField() decorator.

                                                                                                                                                                                                                                                                                    property complexity

                                                                                                                                                                                                                                                                                    complexity?: Complexity;
                                                                                                                                                                                                                                                                                    • Field complexity options.

                                                                                                                                                                                                                                                                                    property deprecationReason

                                                                                                                                                                                                                                                                                    deprecationReason?: string;
                                                                                                                                                                                                                                                                                    • Field deprecation reason (if deprecated).

                                                                                                                                                                                                                                                                                    property description

                                                                                                                                                                                                                                                                                    description?: string;
                                                                                                                                                                                                                                                                                    • Description of the field.

                                                                                                                                                                                                                                                                                    property middleware

                                                                                                                                                                                                                                                                                    middleware?: FieldMiddleware[];
                                                                                                                                                                                                                                                                                    • Array of middleware to apply.

                                                                                                                                                                                                                                                                                    property name

                                                                                                                                                                                                                                                                                    name?: string;
                                                                                                                                                                                                                                                                                    • Name of the field.

                                                                                                                                                                                                                                                                                    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 SubscriptionOptions

                                                                                                                                                                                                                                                                                          interface SubscriptionOptions extends BaseTypeOptions {}
                                                                                                                                                                                                                                                                                          • Interface defining options that can be passed to @Subscription() decorator.

                                                                                                                                                                                                                                                                                          property deprecationReason

                                                                                                                                                                                                                                                                                          deprecationReason?: string;
                                                                                                                                                                                                                                                                                          • Subscription deprecation reason (if deprecated).

                                                                                                                                                                                                                                                                                          property description

                                                                                                                                                                                                                                                                                          description?: string;
                                                                                                                                                                                                                                                                                          • Description of the subscription.

                                                                                                                                                                                                                                                                                          property filter

                                                                                                                                                                                                                                                                                          filter?: (
                                                                                                                                                                                                                                                                                          payload: any,
                                                                                                                                                                                                                                                                                          variables: any,
                                                                                                                                                                                                                                                                                          context: any
                                                                                                                                                                                                                                                                                          ) => boolean | Promise<boolean>;
                                                                                                                                                                                                                                                                                          • Filter messages function.

                                                                                                                                                                                                                                                                                          property name

                                                                                                                                                                                                                                                                                          name?: string;
                                                                                                                                                                                                                                                                                          • Name of the subscription.

                                                                                                                                                                                                                                                                                          property resolve

                                                                                                                                                                                                                                                                                          resolve?: (
                                                                                                                                                                                                                                                                                          payload: any,
                                                                                                                                                                                                                                                                                          args: any,
                                                                                                                                                                                                                                                                                          context: any,
                                                                                                                                                                                                                                                                                          info: any
                                                                                                                                                                                                                                                                                          ) => any | Promise<any>;
                                                                                                                                                                                                                                                                                          • Resolve messages function (to transform payload/message shape).

                                                                                                                                                                                                                                                                                          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 name

                                                                                                                                                                                                                                                                                          name: string;
                                                                                                                                                                                                                                                                                          • Name of the union.

                                                                                                                                                                                                                                                                                          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 ArrayElement

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

                                                                                                                                                                                                                                                                                            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 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 GqlTypeReference

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

                                                                                                                                                                                                                                                                                                            type GraphQLExecutionContext

                                                                                                                                                                                                                                                                                                            type GraphQLExecutionContext = GqlExecutionContext;

                                                                                                                                                                                                                                                                                                              type GraphQLSubscriptionTransportWsConfig

                                                                                                                                                                                                                                                                                                              type GraphQLSubscriptionTransportWsConfig = Partial<
                                                                                                                                                                                                                                                                                                              Pick<
                                                                                                                                                                                                                                                                                                              SubscriptionTransportWsServerOptions,
                                                                                                                                                                                                                                                                                                              'onConnect' | 'onDisconnect' | 'keepAlive'
                                                                                                                                                                                                                                                                                                              >
                                                                                                                                                                                                                                                                                                              > & {
                                                                                                                                                                                                                                                                                                              path?: string;
                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                type GraphQLWsSubscriptionsConfig

                                                                                                                                                                                                                                                                                                                type GraphQLWsSubscriptionsConfig = Partial<
                                                                                                                                                                                                                                                                                                                Pick<
                                                                                                                                                                                                                                                                                                                ServerOptions,
                                                                                                                                                                                                                                                                                                                | 'connectionInitWaitTimeout'
                                                                                                                                                                                                                                                                                                                | 'onConnect'
                                                                                                                                                                                                                                                                                                                | 'onDisconnect'
                                                                                                                                                                                                                                                                                                                | 'onClose'
                                                                                                                                                                                                                                                                                                                | 'onSubscribe'
                                                                                                                                                                                                                                                                                                                | 'onNext'
                                                                                                                                                                                                                                                                                                                >
                                                                                                                                                                                                                                                                                                                > & {
                                                                                                                                                                                                                                                                                                                path?: string;
                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                  type NextFn

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

                                                                                                                                                                                                                                                                                                                    type NullableList

                                                                                                                                                                                                                                                                                                                    type NullableList = 'items' | 'itemsAndList';

                                                                                                                                                                                                                                                                                                                      type NumberScalarMode

                                                                                                                                                                                                                                                                                                                      type NumberScalarMode = 'float' | 'integer';

                                                                                                                                                                                                                                                                                                                        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 = (returns?: void) => ReturnTypeFuncValue;

                                                                                                                                                                                                                                                                                                                              type ReturnTypeFuncValue

                                                                                                                                                                                                                                                                                                                              type ReturnTypeFuncValue = GqlTypeReference | [GqlTypeReference];

                                                                                                                                                                                                                                                                                                                                type SubscriptionConfig

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

                                                                                                                                                                                                                                                                                                                                  type Union

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

                                                                                                                                                                                                                                                                                                                                    Package Files (61)

                                                                                                                                                                                                                                                                                                                                    Dependencies (14)

                                                                                                                                                                                                                                                                                                                                    Dev Dependencies (7)

                                                                                                                                                                                                                                                                                                                                    Peer Dependencies (6)

                                                                                                                                                                                                                                                                                                                                    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>