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

SetDataOptions.md

18 lines718 Bytes

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