UNPKG

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