UNPKG

1.47 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 `@ObjectType()` decorator
9 */
10export interface ObjectTypeOptions {
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 * Interfaces implemented by this object type.
21 */
22 implements?: Function | Function[] | (() => Function | Function[]);
23}
24/**
25 * Decorator that marks a class as a GraphQL type.
26 */
27export declare function ObjectType(): ClassDecorator;
28/**
29 * Decorator that marks a class as a GraphQL type.
30 */
31export declare function ObjectType(options: ObjectTypeOptions): ClassDecorator;
32/**
33 * Decorator that marks a class as a GraphQL type.
34 */
35export declare function ObjectType(name: string, options?: ObjectTypeOptions): ClassDecorator;
36//# sourceMappingURL=object-type.decorator.d.ts.map
\No newline at end of file