-
Notifications
You must be signed in to change notification settings - Fork 538
Open
Labels
postgrest-jsRelated to the postgrest-js library.Related to the postgrest-js library.
Description
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.
type Database = {
public: {
Tables: {
/* standard signatures go here */
// Allow any table name in from etc
[key: string]: any;
}
}
}Metadata
Metadata
Assignees
Labels
postgrest-jsRelated to the postgrest-js library.Related to the postgrest-js library.