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

defaultShouldDehydrateQuery.md

29 lines631 Bytes

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