diff --git a/docs/reference/QueryCache.md b/docs/reference/QueryCache.md index 09a9c8e5357..2c34da50881 100644 --- a/docs/reference/QueryCache.md +++ b/docs/reference/QueryCache.md @@ -22,7 +22,7 @@ const queryCache = new QueryCache({ }, }) -const query = queryCache.find(['posts']) +const query = queryCache.find({ queryKey: ['posts'] }) ``` Its available methods are: @@ -52,7 +52,7 @@ Its available methods are: > Note: This is not typically needed for most applications, but can come in handy when needing more information about a query in rare scenarios (eg. Looking at the query.state.dataUpdatedAt timestamp to decide whether a query is fresh enough to be used as an initial value) ```tsx -const query = queryCache.find(queryKey) +const query = queryCache.find({ queryKey }) ``` **Options** @@ -71,7 +71,7 @@ const query = queryCache.find(queryKey) > Note: This is not typically needed for most applications, but can come in handy when needing more information about a query in rare scenarios ```tsx -const queries = queryCache.findAll(queryKey) +const queries = queryCache.findAll({ queryKey }) ``` **Options**