Live data from Hacker News

Supabase-JS v2

supabase.com

61–70 of 82 posts

Re: Supabase-JS v2

#61
post #44

Anyone running projects with just Next.js + Supabase and no traditional backend?

I tried to make this work for me, but I finally gave up this week and wrote a traditional backend component for part of my backend because supabase doesn't support transactions and I am NOT going to write my whole backend in postgres functions.

You could hook up Prisma (or any other Orm) to Supabase and use their transaction API. Though this will still need to be in server part of NextJS (api routes or getServerSideProps), but would be faster than rolling an entire backend.

Re: Supabase-JS v2

#63
I really love Supabase and I would consider it for my new project but I have a requirement to be schemaless, I know the reasons why they chose Postgres, those are explained clearly on their website, but I wish they added a NoSQL DB as an alternative at least.

In their FAQs they argue that you can just use JSON columns in Postgres but that doesn't really solve my issue because those columns would still need to be pre-defined.

Re: Supabase-JS v2

#66
if the logged out issue is truly fixed then this is amazing - waiting for it to get added to the auth helper lib!

(i’m the github complainer)

Re: Supabase-JS v2

#67
post #63

I really love Supabase and I would consider it for my new project but I have a requirement to be schemaless, I know the reasons why they chose Postgres, those are explained clearly on their website, but I wish they added a NoSQL DB as an alternative at least. In their FAQs they argue that you can just use JSON columns in Postgres but that doesn't really solve my issue because those columns would still need to be pre-…

Why not create a table with a single JSON column and dump everything in there?

Re: Supabase-JS v2

#68

How do you limit the queries allowed in the UI aka prevent someone from making a really slow / large query? Do you general not use supabase directly in the UI and write an API that your front end can call instead?

Note that the JS client is deliberately limited in the queries it can perform[1].

You can also be fully restrictive by only allowing the client to call the custom SQL functions[2] you define. In Supabase this is done by having all your tables in a "private" schema and only SQL functions in the "public" schema(whose db objects get exposed to the client).

[1]: https://postgrest.org/en/stable/api.html#custom-queries

[2]: https://supabase.com/docs/reference/javascript/rpc

Post reply on HN