Open olee opened 5 months ago
I think the 3rd signature for the from method should be removed which currently allows using any table name inside the postgrest client: https://github.com/supabase/postgrest-js/blob/f730aa793fbc8650de8bf914c816e943eba42844/src/PostgrestClient.ts#L59-L66 Currently this makes it quite hard to catch errors when for example removing or renaming tables.
from
If anyone would like to allow calling from on unknown tables, they could still do it imho by adding an index signature to the schema eg.
type Database = { public: { Tables: { /* standard signatures go here */ // Allow any table name in from etc [key: string]: any; } } }
I think the 3rd signature for the
from
method should be removed which currently allows using any table name inside the postgrest client: https://github.com/supabase/postgrest-js/blob/f730aa793fbc8650de8bf914c816e943eba42844/src/PostgrestClient.ts#L59-L66 Currently this makes it quite hard to catch errors when for example removing or renaming tables.If anyone would like to allow calling from on unknown tables, they could still do it imho by adding an index signature to the schema eg.