Method
mutate
(
variables: TVariables,
options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>,
)
Source from the content-addressed store, hash-verified
| 126 | } |
| 127 | |
| 128 | mutate( |
| 129 | variables: TVariables, |
| 130 | options?: MutateOptions<TData, TError, TVariables, TOnMutateResult>, |
| 131 | ): Promise<TData> { |
| 132 | this.#mutateOptions = options |
| 133 | |
| 134 | this.#currentMutation?.removeObserver(this) |
| 135 | |
| 136 | this.#currentMutation = this.#client |
| 137 | .getMutationCache() |
| 138 | .build(this.#client, this.options) |
| 139 | |
| 140 | this.#currentMutation.addObserver(this) |
| 141 | |
| 142 | return this.#currentMutation.execute(variables) |
| 143 | } |
| 144 | |
| 145 | #updateResult(): void { |
| 146 | const state = |