-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
queryCache.invalidateQueries() function doesn't work if the related useQuery definition has { enabled: false } configuration.
Here is the definition of my 'menus'

If I try to create a new 'menu', invalidateQueries works as expected

But if I add a configuration as { enabled: false} as in the below image invalidateQueries function doesn't work

I've spent too many hours on this issue. I changed every other details/configuration but nothing helped. I also tried my other queryKeys other than 'menus' but the problem remains. In my case, it's not a big deal to remove the { enable: false } configuration but is this the expected output ?
- OS: macOS
- Browser: Any browser
- 10.15.3
React Query - v2.12.1
React Query Developer Tools - v2.3.2
Apart from this issue React Query has been smooth and wonderful. Thanks everyone who contributes this project.
Peace