custom queryClient and prefetchQuery()

I create a custom queryClient and pass it to refine. and then I use queryClient.prefetchQuery() to fetch data but it is not show in devtools and the prefetch also seems does not work. what would be the cause?
6 Replies
kapa.ai
kapa.ai2y ago
Hi @joegor. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
kapa.ai
kapa.ai2y ago
---------------------- Hmm, I don't know enough to give you a confident answer yet. However, you can refer to the Refine documentation (https://refine.dev/docs/api-reference/core/components/refine-config) for more information on how to configure the React Query client with Refine. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
| refine
`` component is the entry point of a refine app. It is where the highest level of configuration of the app occurs.
kapa.ai
kapa.ai2y ago
<@666988497940250624> kapa.ai is still learning and improving, please let us how it did by reacting below
sensitive-blue
sensitive-blueOP2y ago
another problem is when I use useQuery(). it keeps throw "No QueryClient set, use QueryClientProvider to set one"
sensitive-blue
sensitive-blueOP2y ago
my config is
No description
sensitive-blue
sensitive-blueOP2y ago
the useQuery() is used inside Component <Refine> <Component/> </Refine>