Type safe queries and subscriptions using table introspection #1011
Unanswered
jsvde
asked this question in
Feature Requests
Replies: 1 comment
-
Just a few pointers, for people who might stumble upon this in the near future: There is already a pull request open at supabase/postgrest-js#152 which comes already pretty close to what I tried suggest above. On the introspection side of things the cli plans to support such a feature, see supabase/cli#2 Sorry, I was a bit too excited over the "idea" to properly dig through the existing repositories/issues :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Supabase!
supabase-js is already written in typescript so I wondered why not take it one step further and have type safe queries (and/or subscriptions) bound to the actual database schema?
With the pg-api and table introspection it would be possible to generate all types required to do so.
Would be super cool to have a typed client library according to the current database schema, since the first thing I did when trying out supabase was a typo in the table name :)
Beta Was this translation helpful? Give feedback.
All reactions