Open ohrrkan opened 4 months ago
Is there any PR which fixes those? I recently updated supabase-js version and generated new types and got similar issue, some database fields are not recognized anymore. I cant pinpoint the exact moment it stated to break tho.
Edit: For me this solved it - https://github.com/supabase/supabase-js/issues/974
Same problem for me even when switching to 2.39.3
@supabase/supabase-js": "^2.39.0" using Supabase CLI to [generate the types] "supabase": "^1.123.0"
Query the same referenced table multiple times work but give you a Typescript error as it expect an array.
to reproduce you can use the datasource (doc example)
query :
now using data[0].sender_id.name will work but will give you an typescript error. "sender_id: SelectQueryError<"Referencing missing column
name
">[];Bypass temporary solution :
type patch = { content: text; sender_id: Tables<"users">; receiver_id: Tables<"users">}[];