S
Supabase20h ago
zoaha

Supabase JS sometimes type safe, sometimes not?

take this setup:
import type { Database} from './supabaseDef';
const supabase = createClient<Database>('https://secret.supabase.co', 'sb_publishable_secret')
const { data, error } = await supabase.from('myTable').select().order("id", { ascending: false })
import type { Database} from './supabaseDef';
const supabase = createClient<Database>('https://secret.supabase.co', 'sb_publishable_secret')
const { data, error } = await supabase.from('myTable').select().order("id", { ascending: false })
the .from is type safe, and I get error if I try to use a table not specified in the generated type file but the .order is not type safe and I can put anything there, if the column doesn't exists, it fails silently which is terrible am I doing something wrong?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?