how to get access of another table based off foreign key?

while fetching dishes table, i want to fetch the user's name based on the user_id which is common to both the recipes and user_profiles table.

i have followed the docs at https://supabase.com/docs/guides/api/joins-and-nesting?language=js&output-format=table and ended up with the following code

const { data } = await client
        .from("influencer_dishes")
        .select(`name, total_orders, price,       user_profiles (user_id, name)`)


but when i check network tab, it returns 400 and error message as follows

Could not find a relationship between 'influencer_dishes' and 'user_profiles' in the schema cache


what am i doing wrong?
The Data APIs automatically detect relationships between Postgres tables.
Was this page helpful?