T
TanStack9mo ago
adverse-sapphire

Is it possible to globally configure QueryClient *after* it's instantiated?

I have a use case where a feature flag loaded asynchronously needs to control the global configs, ie. disable retries. Wondering if it's possible to do this after QueryClient is instantiated.
2 Replies
correct-apricot
correct-apricot9mo ago
QueryClient | TanStack Query Docs
QueryClient The QueryClient can be used to interact with a cache: tsx import { QueryClient } from '@tanstack/react-query' const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime:...
adverse-sapphire
adverse-sapphireOP9mo ago
queryClient.setDefaultOptions 🤦🏻. Thanks!

Did you find this page helpful?