Describe the bug
When I'm trying to queryCache.invalidateQueries(keyGoesHere) and I'm using the new hydration API, the queryCache object is empty, so I cannot invalidate or override any of the data.
Expected behavior
queryCache should contain the queries that are prefetched on the "Hydrate" component or another way to invalidate or set new data for a specific query.
Screenshots



*Desktop *
-macOs
For someone else having the same issue
instead of import { queryCache } from "react-query" you should use const querycache = useQueryCache()
I had this issue as well where the 'import' technique was not clearing the cache setup by ReactQueryCacheProvider. Using the hook resolved the issue
Most helpful comment
For someone else having the same issue
instead of
import { queryCache } from "react-query"you should useconst querycache = useQueryCache()