What do you use to fetch data with Supabase in larger applications?
I'm curious how others are handling data fetching in more complex Supabase applications.
We started with supabase-js, but as our application grew, we've run into a few challenges:
- We can't rely heavily on RLS for every query because some policies were noticeably impacting performance.
- Some of our queries involve multiple tables and business logic, and managing everything through
supabase-jshas become difficult. - We've occasionally had issues with complex joins and nested queries not behaving exactly as expected.
We also experimented with Edge Functions, but we've seen cases where requests remain in a "pending" state for a while, which seems similar to cold-start behavior.
RPCs work, but they can be cumbersome to maintain. Updating a function requires creating migrations, and reviewing SQL function changes in PRs is not as straightforward as reviewing application code.
For teams building larger applications on Supabase:
- Are you still using
supabase-jsdirectly? - Do you have a separate backend (Node.js, NestJS, etc.) that talks to Supabase/Postgres?
- Are you using Edge Functions, RPCs, or something else?
- How do you handle complex queries and business logic?
I'd love to hear what architecture has worked well for you and what tradeoffs you've encountered.