PGRST200

what this Supabase data API error means

How it shows up

Could not find a relationship between '<table>' and '<other_table>' in the schema cache

What it means

The query tried to embed one table inside another in a single request, but the API knows no foreign key between them. Either the relationship does not exist, or the API's schema cache is out of date.

The usual cause in an AI-built app

AI tools often write a select like select('*, profiles(*)') that assumes a link between two tables. The generated SQL may point the foreign key at auth.users instead of profiles, or never create it at all.

Check this first

Open the table in the Supabase Table Editor and check that it has a foreign key column pointing at the other table named in the error.

More Supabase data API codes