SupabaseS
Supabase•2y ago
Grantly

Using Type Safe Client in Edge Functions

I have been trying to create a type safe client in my Supabase Edge Functions.
1) I generated the Database types in the functions folder (so it could be deployed, etc...)
2) Created the type safe client in a function: supabase = createClient<Database>(...);
3) Deployed successfully

Still I am getting no types 😦

I have absolutely LOVED this feature and use it everywhere else in my project, so if there was anyway I could use it in Supabase Edge Functions I would be so excited.

Please let me know if this isn't possible (and I'll stop trying to get it working), or if it is possible and I need to reconfigure something!

Thank You!
Was this page helpful?