UNPKG

1.56 kBTypeScriptView Raw
1/**
2 * The API surface of this module has been heavily inspired by the "type-graphql" library (https://github.com/MichalLytek/type-graphql), originally designed & released by Michal Lytek.
3 * In the v6 major release of NestJS, we introduced the code-first approach as a compatibility layer between this package and the `@nestjs/graphql` module.
4 * Eventually, our team decided to reimplement all the features from scratch due to a lack of flexibility.
5 * To avoid numerous breaking changes, the public API is backward-compatible and may resemble "type-graphql".
6 */
7import { ResolveTypeFn } from '../interfaces';
8/**
9 * Interface defining options that can be passed to `@InterfaceType()` decorator.
10 */
11export interface InterfaceTypeOptions {
12 /**
13 * Description of the argument.
14 */
15 description?: string;
16 /**
17 * If `true`, type will not be registered in the schema.
18 */
19 isAbstract?: boolean;
20 /**
21 * Custom implementation of the "resolveType" function.
22 */
23 resolveType?: ResolveTypeFn<any, any>;
24 /**
25 * Interfaces implemented by this interface.
26 */
27 implements?: Function | Function[] | (() => Function | Function[]);
28}
29/**
30 * Decorator that marks a class as a GraphQL interface type.
31 */
32export declare function InterfaceType(options?: InterfaceTypeOptions): ClassDecorator;
33/**
34 * Decorator that marks a class as a GraphQL interface type.
35 */
36export declare function InterfaceType(name: string, options?: InterfaceTypeOptions): ClassDecorator;
37//# sourceMappingURL=interface-type.decorator.d.ts.map
\No newline at end of file