graceful-blue
graceful-blue17mo ago

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.ai17mo 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.ai17mo 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.ai17mo ago
<@666988497940250624> kapa.ai is still learning and improving, please let us how it did by reacting below
graceful-blue
graceful-blue17mo ago
another problem is when I use useQuery(). it keeps throw "No QueryClient set, use QueryClientProvider to set one"
graceful-blue
graceful-blue17mo ago
my config is
No description
graceful-blue
graceful-blue17mo ago
the useQuery() is used inside Component <Refine> <Component/> </Refine>