SupabaseS
Supabase5mo 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 })


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?
Was this page helpful?