Describe the bug
The official documentation describing the enabled option :
When enabled is false:
...
The query will ignore query client invalidateQueries and refetchQueries calls that would normally result in the query refetching.
But In my project queryClient.refetchQueries(queryKey) refetches disabled queries。
Your minimal, reproducible example
none
Steps to reproduce
- Create a
query with useQuery and set enabled option to false.
- Create a
queryClient with useQueryClient.
- Invalidate this
query with refetchQueries.
Expected behavior
The disabled queries (enabled: false) would not refetch when I use refetchQueries
How often does this bug happen?
No response
Screenshots or Videos
No response
Platform
OS: macOs
Browser: Not related
react-query version
^3.39.2
TypeScript version
^4.7.4
Additional context
No response
Describe the bug
The official documentation describing the enabled option :
But In my project queryClient.refetchQueries(queryKey) refetches disabled queries。
Your minimal, reproducible example
none
Steps to reproduce
querywithuseQueryand setenabledoption tofalse.queryClientwithuseQueryClient.querywithrefetchQueries.Expected behavior
The disabled queries (
enabled: false) would notrefetchwhen I userefetchQueriesHow often does this bug happen?
No response
Screenshots or Videos
No response
Platform
OS: macOs
Browser: Not related
react-query version
^3.39.2
TypeScript version
^4.7.4
Additional context
No response