All views and tables in the public schema and accessible by the active
database role for a request are available for querying.
import { useParams } from 'common' import Link from 'next/link' import CodeSnippet from 'components/interfaces/Docs/CodeSnippet' import GeneratingTypes from 'components/interfaces/Docs/GeneratingTypes' import { useProjectPostgrestConfigQuery } from 'data/config/project-postgrest-config-query' import PublicSchemaNotEnabledAlert from '../../PublicSchemaNotEnabledAlert' interface IntroductionProps { selectedLang: 'bash' | 'js' } const Introduction = ({ selectedLang }: IntroductionProps) => { const { ref: projectRef } = useParams() const { data: config, isSuccess } = useProjectPostgrestConfigQuery({ projectRef }) const isPublicSchemaEnabled = config?.db_schema .split(',') .map((name) => name.trim()) .includes('public') return ( <>
All views and tables in the public schema and accessible by the active
database role for a request are available for querying.
If you don't want to expose tables in your API, simply add them to a different schema
(not the public schema).
If you have a GraphQL background, you might be wondering if you can fetch your data in a single round-trip. The answer is yes!
The syntax is very similar. This example shows how you might achieve the same thing with
Apollo GraphQL and Supabase.
If you still want to use GraphQL, you can. Supabase provides you with a full Postgres database, so as long as your middleware can connect to the database then you can still use the tools you love. You can find the database connection details{' '} in the settings.