Skip to content
Discussion options

You must be logged in to vote

hm, I don't really understand the use-case, but what you can do is:

const result = useQuery(
['query key'], 
async (queryKey) => {
 const response = await (...)
 return { ...response.data, queryKey }
})

and then data will just have the queryKey ...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rongdi1993
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