Skip to content

Add meta in each item returned by useQueries #4024

Answered by TkDodo
dgrcode asked this question in Ideas
Discussion options

You must be logged in to vote

you can easily attach the userId to the result object in the queryFn, though I would expect the getRecordsForUser(userId) function to potentially contain the userId already. Then, you can use groupBy or something similar to group the results by that id. So generally, if you want something available on the result, add it to the data field, which is what the queryFn returns.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@dgrcode
Comment options

@dgrcode
Comment options

Answer selected by dgrcode
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants