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

Function dehydrateMutation

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

Source from the content-addressed store, hash-verified

78// FUNCTIONS
79
80function dehydrateMutation(mutation: Mutation): DehydratedMutation {
81 return {
82 mutationKey: mutation.options.mutationKey,
83 state: mutation.state,
84 ...(mutation.options.scope && { scope: mutation.options.scope }),
85 ...(mutation.meta && { meta: mutation.meta }),
86 }
87}
88
89function dehydratePromise(
90 query: Query,

Callers 1

dehydrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected