Live data from Hacker News

Pg_GraphQL: A GraphQL Extension for PostgreSQL

supabase.com

1–10 of 102 posts

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#6
post #5

That’s interesting. How does it deal with authentication and authorization? It it handles those well, it could be a real “serverless” solution for most CRUD apps.

They mention in the article that auth is handled by reusing the existing row level security you'd already use to secure the DB (i.e. `CREATE POLICY`).

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#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.

Re: Pg_GraphQL: A GraphQL Extension for PostgreSQL

#10
post #5

That’s interesting. How does it deal with authentication and authorization? It it handles those well, it could be a real “serverless” solution for most CRUD apps.

The extension is compatible with your existing row level security policies. If you connect to the database as a role like `authenticated` then those policies will be applied.

The columns and tables that are visible are also controlled by the role.

One cool thing about that approach is you could run e.g. an admin API and a user facing API all from that same endpoint by executing as different postgres roles!

Post reply on HN