Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

useQuery hook not passing on results #3409

Closed
olup opened this issue Aug 24, 2019 · 1 comment
Closed

useQuery hook not passing on results #3409

olup opened this issue Aug 24, 2019 · 1 comment

Comments

@olup
Copy link

olup commented Aug 24, 2019

Using useQuery hook to fetch a wiki page from my api. The call appears in network requests, and has propper datas as result.
However, the data I get from the hook is either undefined either the last page successfully written in cache by other queries.
So I get this strange bug where I try to daw the page based on slug, but get either a blank result or another page of my list - and this even with propper network queries.

Maybe related to : #3262 and #3404

got this on 3.0.0 and 3.0.1-beta

@olup olup changed the title useQuery not passing on results useQuery hook not passing on results Aug 24, 2019
@olup
Copy link
Author

olup commented Aug 24, 2019

My bad, the library was throwing an error because id wasn't present on the request, and as such the cache insertion would break. Isn't it strange though that it would nevertheless return the last id-able element instead of an undefined response ?

@olup olup closed this as completed Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant