Expose non-public schema to supabase-js client #1222
-
Is it possible to expose a custom database schema directly to the I see the client constructor takes a schema option that defines the option as: options.schema - You can switch in between schemas. The schema needs to be on the list of exposed schemas inside Supabase. I believe I have my schema grants in order, but, when I try to make a request with the client I'm failing content negotiation with a 406 and I get the response:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 11 replies
-
Not right now, but it will possible soon(ish). The supabase UI will add a |
Beta Was this translation helpful? Give feedback.
-
Its a very urgently needed feature. This stops us from using Supabase-Js even with a self hosted Supabase instance. |
Beta Was this translation helpful? Give feedback.
-
Exposes, but does not add it to the |
Beta Was this translation helpful? Give feedback.
-
note - you should be able to bypass it using vanilla postgres library import pg from 'pg'; // node-pg returns numerics as strings by default. since we don't expect to export const db = new pg.Pool({ |
Beta Was this translation helpful? Give feedback.
-
You can expose the custom schema using the config.toml file API configuration section. |
Beta Was this translation helpful? Give feedback.
Not right now, but it will possible soon(ish). The supabase UI will add a
db-schemas
setting on/settings/api
, there you'll be able to add more schemas besidespublic
andstorage
.