SELECT project_members.user_id, users_lookup.email, users_lookup.first_name, users_lookup.last_name FROM project_members INNER JOIN users_lookup ON project_members.user_id = users_lookup.user_id WHERE project_members.project_id = 'abcdefgh';
This query runs perfectly in the SQL editor in supabase. Now i want to run the same query through javascript. I'm following the documentation to the write this query in javascript
This join needs to select the data from the users_lookup table where the user_id from the project_members table matches with the user_id in the users_lookup table and also the project_id should match the id in project_id variable so essentially I'm selecting members from the table who's project_id matches the one given and then for those users I'm using the user_id to get the respective data from the users_lookup table
When I try to run this I'm getting this error
Could not find a relationship between 'project_members' and 'users_lookup' in the schema cache
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.