Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

defaultShouldDehydrateQuery.md

27 lines558 Bytes

1---
2id: defaultShouldDehydrateQuery
3title: defaultShouldDehydrateQuery
4---
5​
6```ts
7function defaultShouldDehydrateQuery(query: Query): boolean;
8```
9​
10Defined in: [packages/query-core/src/hydration.ts:219](https://github.com/TanStack/query/blob/main/packages/query-core/src/hydration.ts#L219)
11​
12The default `shouldDehydrateQuery` predicate used by `dehydrate`. Only dehydrates queries whose status is
13`'success'`.
14​
15## Parameters
16​
17### query
18​
19[`Query`](../classes/Query.md)
20​
21The query to check.
22​
23## Returns
24​
25`boolean`
26​
27`true` if the query's status is `'success'`.