psteinroe / fastify-supabase

A Fastify plugin to use authenticated Supabase clients in your API.
MIT License
21 stars 2 forks source link

Feature Request: Add Database Type Support for Fastify Supabase Client #35

Open ollebergkvist opened 2 months ago

ollebergkvist commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, when using the fastifySupabase plugin, it's not possible to provide a specific Database type to the Supabase client during initialization. As a result, developers need to manually define the Database type throughout their codebase to take advantage of TypeScript's type inference, which adds unnecessary redundancy and increases the potential for errors.

Describe the solution you'd like I would like to have the ability to supply the Database type directly during the initialization of the fastifySupabase plugin. This would allow the type to be inferred automatically across the application, reducing the need to manually specify the Database type in multiple places.