marmelab / ra-supabase

Supabase adapter for react-admin, the frontend framework for building admin applications on top of REST/GraphQL services.
MIT License
156 stars 27 forks source link

Can't choose other db schema than public in supabaseDataProvider #31

Closed spyriaev closed 10 months ago

spyriaev commented 1 year ago

I can't change a schema different from the public one passing a parameterized supbaseClient to supabaseDataProvider.

const options: SupabaseClientOptions<"stats"> = {
    db: { schema: 'stats' }
}
export const supbaseClient =
    createClient<StatsDatabase>(process.env.NEXT_PUBLIC_SUPABASE_URL!,
        process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
        options);

Would you mind considering to use generic parameters in supabaseDataProvider?

djhi commented 1 year ago

Sure, can you open a PR?

slax57 commented 10 months ago

Fixed via #47