MCPcopy Create free account
hub / github.com/TanStack/query / setOptions

Method setOptions

packages/query-core/src/mutation.ts:175–181  ·  view source on GitHub ↗

* Replaces the mutation's options and applies their `gcTime`. * @internal * @param options - The new mutation options.

(
    options: MutationOptions<TData, TError, TVariables, TOnMutateResult>,
  )

Source from the content-addressed store, hash-verified

173 * @param options - The new mutation options.
174 */
175 setOptions(
176 options: MutationOptions<TData, TError, TVariables, TOnMutateResult>,
177 ): void {
178 this.options = options
179
180 this.updateGcTime(this.options.gcTime)
181 }
182
183 /**
184 * The `meta` object passed in the mutation's options, if any.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected