Files
upstream-tanstack-query/docs/framework/react/reference/interfaces/HydrateOptions.md
upstream-mirror 3a013ccdfe
Some checks failed
autofix.ci / autofix (push) Failing after 4s
Release / Release (push) Has been skipped
GitHub Actions Security Analysis / Run zizmor (push) Failing after 2s
snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:13:08 +05:00

44 lines
1.1 KiB
Markdown

---
id: HydrateOptions
title: HydrateOptions
---
Defined in: [packages/query-core/src/hydration.ts:61](https://github.com/TanStack/query/blob/main/packages/query-core/src/hydration.ts#L61)
Options for `hydrate`, controlling the default options applied to queries/mutations restored from a
`DehydratedState`, and how to reverse any transformation applied by `DehydrateOptions.serializeData`.
## Properties
### defaultOptions?
```ts
optional defaultOptions: object;
```
Defined in: [packages/query-core/src/hydration.ts:62](https://github.com/TanStack/query/blob/main/packages/query-core/src/hydration.ts#L62)
#### deserializeData?
```ts
optional deserializeData: TransformerFn;
```
Transforms a query's `data` after it is read from the dehydrated state, reversing `serializeData`.
#### mutations?
```ts
optional mutations: MutationOptions<unknown, Error, unknown, unknown>;
```
Default options merged into every mutation restored from the dehydrated state.
#### queries?
```ts
optional queries: QueryOptions<unknown, Error, unknown, readonly unknown[], never>;
```
Default options merged into every query restored from the dehydrated state.