supabase/realtime-js

Ability to Generate Typescript Type Declarations from Server Schema

Marviel opened this issue · 0 comments

Feature request

As a client, I would like to generate typescript definitions for my supabase realtime client -- call it the Typed-SDK -- based on the current schema in my postgres database.

I would also like to have the option to be notified when the types I am trying to use are "out of date" with the database's current schema types.

Describe the solution you'd like

  • I believe in order for this to work, there would need to be some type of CLI command. Similar to how Graphql Codegen handles this.
  • These types could get out of date with the schema in the database, so I would like to have the ability to get (disable-able) warnings whenever my current typed-SDK is out of sync with the server. I believe this could be done by a command which would get the hash of the current (Public) schema.

Additional context