Skip to content

Commit

Permalink
Update docs/reference/QueryClient.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo authored Mar 13, 2024
1 parent 473a149 commit f2ca914
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/reference/QueryClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ const data = await queryClient.ensureQueryData({ queryKey, queryFn })

**Options**

- The options for `ensureQueryData` are almost the same as those of [`fetchQuery`](#queryclientfetchquery) except that `queryKey` is required and that is has an extra optional option `revalidateIfStale`. When set `revalidateIfStale` to true the function will make sure the data will refetch in the background while still returning the data from the cache.
- the same options as [`fetchQuery`](#queryclientfetchquery)
- `revalidateIfStale: boolean`
- Optional
- Defaults to `false`
- If set to `true`, stale data will be refetched in the background, but cached data will be returned immediately.


**Returns**
Expand Down

0 comments on commit f2ca914

Please sign in to comment.