MCPcopy
hub / github.com/TanStack/query / executeMutation

Function executeMutation

packages/query-core/src/__tests__/utils.ts:13–22  ·  view source on GitHub ↗
(
  queryClient: QueryClient,
  options: MutationOptions<any, any, TVariables, any>,
  variables: TVariables,
)

Source from the content-addressed store, hash-verified

11}
12
13export function executeMutation<TVariables>(
14 queryClient: QueryClient,
15 options: MutationOptions<any, any, TVariables, any>,
16 variables: TVariables,
17) {
18 return queryClient
19 .getMutationCache()
20 .build(queryClient, options)
21 .execute(variables)
22}
23
24// This monkey-patches the isServer-value from utils,
25// so that we can pretend to be in a server environment

Callers 3

mutations.test.tsxFile · 0.90
hydration.test.tsxFile · 0.90

Calls 3

executeMethod · 0.80
getMutationCacheMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…