Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

added foreign table example from v1 spec

Ollie Hallidaydf6718e3f326
diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml
index 8899420a2ce..37764e6cf39 100644
--- a/spec/supabase_js_v2.yml
+++ b/spec/supabase_js_v2.yml
@@ -965,10 +965,21 @@ functions:
name: Query foreign tables
description: |
If your database has foreign key relationships, you can query related tables too.
+ code: |
+ ```js
+ const { data, error } = await supabase
+ .from('countries')
+ .select(`
+ name,
+ cities (
+ name
+ )
+ `)
+ ```
- id: query-foreign-tables-through-a-join-table
name: Query foreign tables through a join table
code: |
- ```ts
+ ```js
const { data, error } = await supabase
.from('users')
.select(`