Skip to content

How to get existing data in queryFn? #3019

Answered by phryneas
mad-coder-365 asked this question in Q&A
Discussion options

You must be logged in to vote

Why are you not just doing all of that in queryFn?

queryFn: arg => new Promise((resolve, reject) => {
        const socket = getSocket()
        socket.emit('getUser', user => resolve({ data: user }))
 })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mad-coder-365
Comment options

Answer selected by mad-coder-365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants