drizzle-team / drizzle-team/drizzle-orm

[FEATURE]: client side querying with postgrest

Open
#4,839 1 comment 8 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
35.8k
Forks
1.6k
Avg merge
2d 7h
Merged PRs (30d)
4

Description

### Feature hasn't been suggested before.

- [x] I have verified this feature I'm about to request hasn't been suggested before.

### Describe the enhancement you want to request

I'm using supabase with drizzle kit to manage my DB schema as I want the source of truth to be available in a file, not on a web UI

I'd like to use drizzle as an ORM as well, but for this I would need to build a traditional API layer

supabase allows me to query from the client side with a postgrest REST API (or a graphQL api) using RLS as an auth layer

the problem is that the only convenient, type-safe way to query this API is with the supabase client itself

so I find myself

1. updating my drizzle schema file
2. generating migrations
3. pushing migrations to supabase hosted DB
4. generating types for supabase client
5. using the supabase client to query in my frontend code

I would much rather

1. update drizzle schema
2. generate migrations
3. push migrations
4. generate postgrest openAPI spec with drizzle kit
5. use drizzle ORM to query postgrest API on the frontend

this would allow me to use drizzle as my only interface to my database, and to avoid excessive supabase vendor lock-in

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.