(
client: QueryClient,
options: MutationOptions<TData, TError, TVariables, TContext>,
state?: MutationState<TData, TError, TVariables, TContext>
)
| 44 | } |
| 45 | |
| 46 | build<TData, TError, TVariables, TContext>( |
| 47 | client: QueryClient, |
| 48 | options: MutationOptions<TData, TError, TVariables, TContext>, |
| 49 | state?: MutationState<TData, TError, TVariables, TContext> |
| 50 | ): Mutation<TData, TError, TVariables, TContext> { |
| 51 | const mutation = new Mutation({ |
| 52 | mutationCache: this, |
| 53 | mutationId: ++this.mutationId, |
| 54 | options: client.defaultMutationOptions(options), |
| 55 | state, |
| 56 | defaultOptions: options.mutationKey |
| 57 | ? client.getMutationDefaults(options.mutationKey) |
| 58 | : undefined, |
| 59 | meta: options.meta, |
| 60 | }) |
| 61 | |
| 62 | this.add(mutation) |
| 63 | |
| 64 | return mutation |
| 65 | } |
| 66 | |
| 67 | add(mutation: Mutation<any, any, any, any>): void { |
| 68 | this.mutations.push(mutation) |
nothing calls this directly
no test coverage detected