Live data from Hacker News

Pg_GraphQL: A GraphQL Extension for PostgreSQL

supabase.com

21–30 of 102 posts

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#23
post #11
post #8

I've been using Hasura extensively and love it. I'm curious what the delta is between the two. It's so simple to run Hasura on dokku and instantly get an amazing UI for postgres with the bonus of graphql. It would take a lot for me to switch.

> It would take a lot for me to switch. We were pretty happy with Hasura but had to switch to Postgraphile due to poor multi-database support, bummer. (Postgraphile is not as polished as Hasura in some ways, but since it can used as a library, it's easy to dynamically create N instances of it with different configurations at runtime. Hasura required our ops team to define a new instance of the service in the docker-c…

Pretty recently, as of 2.0, hasura has added support for multiple databases.

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#24

What are the use cases we could use a direct plugin to database for GraphQL? I mean where do we write business logic before data becomes GraphQL?

Security definers are a powerful feature of postgres that allow a lot of business logic to live in the database. With an extension like this, I reckon postgres can theoretically become a first class public api for a surprising number of use cases.

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#27

author here! happy to answer questions

> After tallying the resources reserved for PostgreSQL, PostgREST, Kong, GoTrue, and a handful of smaller services, we were left with a total memory budget of ... 0 MB This was a really interesting bit to me, could you give detail on how the memory usage gets split up across these? Thank you.

sure, if we're talking free-tier:

Postgres runs in a 1 GB VM all by itself with some optimizations to get the most that limited hardware

All other services are in a second 1 GB VM.

You can see a list of those services here https://github.com/supabase/supabase/blob/master/docker/dock...

The memory use per process can differs by use-case, so its important to leave a bit of headroom. For example, PostgREST's memory consumption can grow if the amount of data being returned from its queries is large.

By the time you include:

- supabase studio

- kong

- auth

- storage

- meta

if they each take only 100MB, its pretty snug on a 1 GB VM!

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#30

author here! happy to answer questions

Congrats on release. We use Hasura but haven’t been happy with their speed of iteration, lack of communication of various large bugs, and lack of M1 support / communication.

But we do use a lot of their more advanced features like being able to use aggregates in sorts, aggregates in results, custom functions, etc. What are your plans there and will you have a public roadmap?

Post reply on HN