From f2ca914173dee8c137959a5f88c7766406b65c9e Mon Sep 17 00:00:00 2001 From: Dominik Dorfmeister Date: Wed, 13 Mar 2024 08:36:32 +0100 Subject: [PATCH] Update docs/reference/QueryClient.md --- docs/reference/QueryClient.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/reference/QueryClient.md b/docs/reference/QueryClient.md index 55f080f797..76b51c3441 100644 --- a/docs/reference/QueryClient.md +++ b/docs/reference/QueryClient.md @@ -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**