UNPKG

1.16 kBTypeScriptView Raw
1import { Complexity, FieldMiddleware } from '../interfaces';
2import { BaseTypeOptions } from '../interfaces/base-type-options.interface';
3import { ReturnTypeFunc } from '../interfaces/return-type-func.interface';
4/**
5 * Interface defining options that can be passed to `@ResolveField()` decorator.
6 */
7export interface ResolveFieldOptions extends BaseTypeOptions {
8 /**
9 * Name of the field.
10 */
11 name?: string;
12 /**
13 * Description of the field.
14 */
15 description?: string;
16 /**
17 * Field deprecation reason (if deprecated).
18 */
19 deprecationReason?: string;
20 /**
21 * Field complexity options.
22 */
23 complexity?: Complexity;
24 /**
25 * Array of middleware to apply.
26 */
27 middleware?: FieldMiddleware[];
28}
29/**
30 * Field resolver (method) Decorator.
31 */
32export declare function ResolveField(typeFunc?: ReturnTypeFunc, options?: ResolveFieldOptions): MethodDecorator;
33/**
34 * Property resolver (method) Decorator.
35 */
36export declare function ResolveField(propertyName?: string, typeFunc?: ReturnTypeFunc, options?: ResolveFieldOptions): MethodDecorator;
37//# sourceMappingURL=resolve-field.decorator.d.ts.map
\No newline at end of file