Query undefined if I reload the page
I'm using rq with nextjs. I'm using the pages router and I'm having the following problem:
This is my query:
rosterData is the data I pass to the page as a prop from getServerSideProps.
What happens is: If I navigate to the page using the router, everything works perfect, but if for some reason y reload the page using F5 for example, the query stops working and returns undefined.
Does anyone have insight in why is this happening?
1 Reply
rising-crimson•2y ago
!session?.accessToken || !session.apiEndpointthen this condition is likely falsy also, please don't return undefined from the queryFn. you should see a warning that this isn't allowed