How to get existing data in queryFn? #3019
-
I have a builder query like
And I call it like
In the component, I have set it up such that it will show a loading spinner if the user is null. When is component is first loaded it shows a loading spinner then the user data which is expected but after 60 seconds user becomes null and goes back to the loading spinner while it is re-fetching. Is it possible to pass existing data inside How can I update data without making the existing data null using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Why are you not just doing all of that in queryFn: arg => new Promise((resolve, reject) => {
const socket = getSocket()
socket.emit('getUser', user => resolve({ data: user }))
}) |
Beta Was this translation helpful? Give feedback.
Why are you not just doing all of that in
queryFn
?