0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/react/reference/interfaces/DehydrateOptions.md
Wonsuk Choi f38e6271b4
chore(*): update '@tanstack/typedoc-config' to v0.3.5 (#12035)
* chore(scripts/generate-docs): read type alias bodies whose type parameters have defaults

* chore(*): update '@tanstack/typedoc-config' to v0.3.5
2026-10-17 11:14:03 +09:00

1.6 KiB

id title
DehydrateOptions DehydrateOptions

Defined in: packages/query-core/src/hydration.ts:49

Options for dehydrate, controlling which queries/mutations are included in the resulting DehydratedState and how their data/errors are transformed before being serialized (e.g. for embedding in server-rendered markup).

Properties

Property Type Description
serializeData? TransformerFn Transforms a query's data before it is dehydrated. Useful for non-JSON-serializable data.
shouldDehydrateMutation? (mutation: Mutation) => boolean Predicate to decide whether a given Mutation should be dehydrated. Defaults to defaultShouldDehydrateMutation.
shouldDehydrateQuery? (query: Query) => boolean Predicate to decide whether a given Query should be dehydrated. Defaults to defaultShouldDehydrateQuery.
shouldRedactErrors? (error: unknown) => boolean Predicate to decide whether a query's error should be redacted before dehydration. Errors are redacted (replaced with a generic Error('redacted')) unless this function is provided and returns false for the given error, in which case the original error is kept.