TanStackT
TanStack9mo ago
5 replies
ordinary-sapphire

How to silence missing queryFn warnings?

I have a project which uses react-query as a generic store (ala zustand). State is set via setQueryData() or <HydrationBoundary>, and consumed with useQuery as normal. staleTime is set to
Infinity
so no data fetching occurs.

My understanding is that this is a common use case for react-query. However after a recent update https://github.com/TanStack/query/pull/8701 I get tons of warnings about missing queryFn.

Is there a way to silence the warnings?
Was this page helpful?