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

SetDataOptions.md

16 lines645 Bytes

1---
2id: SetDataOptions
3title: SetDataOptions
4---
5​
6Defined in: [packages/query-core/src/types.ts:2413](https://github.com/TanStack/query/blob/main/packages/query-core/src/types.ts#L2413)
7​
8Options for writing data into the cache, e.g. via `queryClient.setQueryData()`.
9`updatedAt` overrides the timestamp the data is recorded with, which is what staleness is measured from;
10omit it to use the current time.
11​
12## Properties
13​
14| Property | Type | Description |
15| ------ | ------ | ------ |
16| <a id="property-updatedat"></a> `updatedAt?` | `number` | The timestamp to record the data with, instead of the current time. Staleness is measured from it. |