How to force types on a query
[typescript] I have the following query:
const ticketsQuery = supabase.from('my_tickets').select(
id,
status,
title,
companies (
name
),
users (
name,
)
)
export type TicketType = QueryData<typeof ticketsQuery>[0];
TicketType has all field types set to "any". How can I force the real field types without having to bruteforce the conversion by iterating over all the rows to convert them?1 Reply
Solved in another thread (https://discord.com/channels/839993398554656828/1443511910887723018/1443522445859487794): I forgot to add the "Database" type to the client instantiation
createClient<Database>(...)