gegi
gegi2w ago

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
Convex Bot
Convex Bot2w ago
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!
erquhart
erquhart2w ago
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
gegi
gegiOP2w ago
Thank you!

Did you find this page helpful?