1 | import type {
|
2 | GraphQLFieldConfig,
|
3 | GraphQLFieldExtensions,
|
4 | GraphQLInputFieldConfig,
|
5 | GraphQLResolveInfo,
|
6 | ThunkObjMap,
|
7 | } from 'graphql';
|
8 | declare type MutationFn<TInput = any, TOutput = unknown, TContext = any> = (
|
9 | object: TInput,
|
10 | ctx: TContext,
|
11 | info: GraphQLResolveInfo,
|
12 | ) => TOutput;
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | interface MutationConfig<TInput = any, TOutput = unknown, TContext = any> {
|
28 | name: string;
|
29 | description?: string;
|
30 | deprecationReason?: string;
|
31 | extensions?: GraphQLFieldExtensions<any, any>;
|
32 | inputFields: ThunkObjMap<GraphQLInputFieldConfig>;
|
33 | outputFields: ThunkObjMap<GraphQLFieldConfig<TOutput, TContext>>;
|
34 | mutateAndGetPayload: MutationFn<TInput, Promise<TOutput> | TOutput, TContext>;
|
35 | }
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | export declare function mutationWithClientMutationId<
|
41 | TInput = any,
|
42 | TOutput = unknown,
|
43 | TContext = any,
|
44 | >(
|
45 | config: MutationConfig<TInput, TOutput, TContext>,
|
46 | ): GraphQLFieldConfig<unknown, TContext>;
|
47 | export {};
|