T
TanStack3y ago
flat-fuchsia

Missing queryFn error

Hi, quick question here. We are using a lot of queryDefaults to handle our queries. Sometimes, while developing or in test, in case of incomplete queryKey, we get a ‘missing QueryFn’ error. Right now we use v4. Is there a plan to add more context (queryKey?) to the error? Is it already fixed in v5? Thanks.
6 Replies
magic-amber
magic-amber3y ago
we could definitely add more error logging when in dev mode for this. Sounds like a good PR 🙂
flat-fuchsia
flat-fuchsiaOP3y ago
Ok thanks. Will try that 💪
flat-fuchsia
flat-fuchsiaOP3y ago
Happy to have feedback => https://github.com/TanStack/query/pull/5620 I don't know if there is a better context to dump…
GitHub
refactor(query): add more context to "Missing queryFn" error by GLa...
For now, we display the queryKey for which a queryFn is missing.
flat-fuchsia
flat-fuchsiaOP3y ago
Hum, not sure what to do: the CI failed here:
No description
flat-fuchsia
flat-fuchsiaOP3y ago
No description
flat-fuchsia
flat-fuchsiaOP3y ago
Maybe something wrong in my setup

Did you find this page helpful?