by yurisagalov on 3/29/22, 5:48 PM with 47 comments
by kiwicopple on 3/29/22, 6:50 PM
Our GraphQL implementation is built on top of pg_graphql[0], a PostgreSQL extension we open-sourced a few months ago. The implementation works with a lot of native PG functionality (like Row Level Security). You can also do a some neat things with PG GRANTS, enabling/disabling access to different tables/columns to effectively serve a different GraphQL API depending who is "logged in".
On Supabase, the extension is served via PostgREST[1] using the public PostgreSQL function exposed by pg_graphql. PostgREST exposes PG functions as RPC routes (in our case we also map /rest/v1/rpc/graphql => /graphql/v1)
I'll ping the main dev (@oliverrice) and make sure he is here to answer any technical questions. This is just one of the exciting features we're launching this week. Stay tuned for one of our most-requested features later this week.
[0] pg_graphql: https://github.com/supabase/pg_graphql
[1] PostgREST: https://postgrest.org/
by xrd on 3/29/22, 7:14 PM
The Gui for adding roles and tying them to postgres access is very slick with hasura. Is this done manually via SQL commands with supabase?
My litmus test will be if I can run the entire solution from docker or if I'll need to assemble the pieces. Hasura is so easy to boot up with a few environment variables, run locally or inside dokku, and that makes it so simple to set up and start building.
by gsvclass on 3/30/22, 12:35 AM
by alexkreidler on 3/29/22, 10:37 PM
Did you think about integrating Postgraphile with the Supabase ecosystem or have specific limitations with it?
Thanks!
by syrusakbary on 3/29/22, 8:02 PM
I'm impressed by the pace that you are releasing new products... keep it up team!
by oliverrice on 3/29/22, 7:11 PM
I'm the dev lead on pg_graphql. Happy to answer any questions!
by elitan on 3/30/22, 10:23 AM
I see a lot of mentions of Hasura in the comments.
If you'd like what Supabase is building but prefer using Hasura you might want to check out what we're building at Nhost (http://nhost.io/). We use Hasura's GraphQL Engine for the API layer while also providing Postgres, Auth, Storage and Serverless Functions.
(CEO of Nhost)
by tomatowurst on 3/29/22, 8:06 PM
Thinking of buying a dedicated server from Hetzner to run Supabase on it instead but worried about latency. awful that we have to move away from AWS for this but with four/five dedicated servers in EU, US-West, US-East, Singapore and Tokyo, we could have a fixed monthly storage/database cost with some globalized latency (client would connect to whichever dedicated server is available).
we realize that we are at complete mercy of AWS as was expected but the database storage cost was a curveball, so much so that we are thinking of self-hosting database ourselves but seems like a daunting task of its own.
tldr: unpredictability and variability of storage size on Dynamodb is forcing us to explore a more reliable fixed cost solution via self-hosting and hardening our dedicated servers running Supabase.
by sk55 on 3/29/22, 10:44 PM