get user data
Hello,
I'm looking for best practice and hopefully someone can help me here.
I'm fetching my comments and I want to display the user information of it. In my comments scheme I added only the userId. So my ideas to solve it are:
1. Instead adding only the user id, I add the whole user info I need to the getComments convex function
2. I fetch the user info through the id on the client.
Appreciate any help
3 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Yep, you'll want to fetch the user for each comment in the Convex function via join: https://docs.convex.dev/database/reading-data/#join
Reading Data | Convex Developer Hub
Query and
Thank you!