Hacker News new | ask | show | jobs
by ZiiS 1407 days ago
Much prefer the DX of the types inferring from the `from` and `select`. Also really love that `insert` now understands if a field is required (or has a server-side default etc.)

Unless I am missing something we seem to have lost all typing for Views? And it is less clear how to use PostREST style embedding?

1 comments

> we seem to have lost all typing for Views

I've sent this to the team. We generate the types directly from database, so it's definitely possible.

> PostREST style embedding

For now, you'll need to do something like this:

https://supabase.com/docs/reference/javascript/next/typescri...

In future releases I think we'll have an approach which doesn't require any manual intervention, but for this release we wanted to keep the upgrade path relatively simple (it will probably require us to change from strings - `select('id, name')` - to objects)