snippets.readForeignTables() — supabase Function Reference
Architecture documentation for the snippets.readForeignTables() function in Snippets.ts from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Docs/Snippets.ts lines 295–318
readForeignTables: (resourceId: string, endpoint: string, apiKey: string) => ({
title: 'Read referenced tables',
bash: {
language: 'bash',
code: `
curl '${endpoint}/rest/v1/${resourceId}?select=some_column,other_table(foreign_key)' \\
-H "apikey: ${apiKey}" \\
-H "Authorization: Bearer ${apiKey}"
`,
},
js: {
language: 'js',
code: `
let { data: ${resourceId}, error } = await supabase
.from('${resourceId}')
.select(\`
some_column,
other_table (
foreign_key
)
\`)
`,
},
}),
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free