SupabaseS
Supabase•4y ago
Brams

Getting profile data from another table

Hi all, very new to supabase and started building a basic direct messaging chat app in React Native.

So far I've managed to load the conversations and their corresponding messages including new messages being rendered in realtime, but unfortunately not quite sure on what the best approach would be to get the user name showing as the conversations title in the overview

I figured I'd make a conversations table and conversation_participants table in Supabase

In the conversation table I have a column for ID, created_at and Name (which is being displayed as the title in the video)

In the conversation_participants I have an ID (primary key relation to conversations table id), profile_id (foreign key relation to profiles table) and created_at columns


My question would be what approach you would recommend to get the profile data (first_name and last_name) into my ConversationsScreen component in React Native (where the user should be able to select which conversation to open)

Any suggestions would be greatly appreciated 🙌!
Was this page helpful?