-
-
Couldn't load subscription status.
- Fork 1.2k
Open
Labels
Milestone
Description
I have some async custom queries that were working in 1.8.6, but no longer work in 1.9.0.
The useQuery result is no longer being updated after the async operation completes. Simply reverting to 1.8.6 fixes it immediately.
I notice the tests for this area don't actually have anything to wait for. Perhaps a simple test with a Promise resolving after a short setTimeout might help. Sorry about the lack of real code, all I have is pretty involved. I suspect it is quite simple to reproduce? Hopefully the below helps....
const queryFnWithPromise = () => {
return new Promise<{ data: string }>((resolve) => {
setTimeout(async () => {
resolve({data: 'foo'})
}, 1)
})
}