UNPKG

1.34 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 */
7/**
8 * Interface defining options that can be passed to `@InputType()` decorator.
9 */
10export interface InputTypeOptions {
11 /**
12 * Description of the input type.
13 */
14 description?: string;
15 /**
16 * If `true`, type will not be registered in the schema.
17 */
18 isAbstract?: boolean;
19}
20/**
21 * Decorator that marks a class as a GraphQL input type.
22 */
23export declare function InputType(): ClassDecorator;
24/**
25 * Decorator that marks a class as a GraphQL input type.
26 */
27export declare function InputType(options: InputTypeOptions): ClassDecorator;
28/**
29 * Decorator that marks a class as a GraphQL input type.
30 */
31export declare function InputType(name: string, options?: InputTypeOptions): ClassDecorator;
32//# sourceMappingURL=input-type.decorator.d.ts.map
\No newline at end of file