MCPcopy Index your code
hub / github.com/TanStack/query / dehydrateMutation

Function dehydrateMutation

packages/query-core/src/hydration.ts:63–70  ·  view source on GitHub ↗
(mutation: Mutation)

Source from the content-addressed store, hash-verified

61// FUNCTIONS
62
63function dehydrateMutation(mutation: Mutation): DehydratedMutation {
64 return {
65 mutationKey: mutation.options.mutationKey,
66 state: mutation.state,
67 ...(mutation.options.scope && { scope: mutation.options.scope }),
68 ...(mutation.meta && { meta: mutation.meta }),
69 }
70}
71
72// Most config is not dehydrated but instead meant to configure again when
73// consuming the de/rehydrated data, typically with useQuery on the client.

Callers 1

dehydrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…