GraphQL is now available on Supabase
supabase.com
GraphQL is now available on Supabase
1–10 of 49 posts
Re: GraphQL is now available on Supabase
#2Our 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/
Re: GraphQL is now available on Supabase
#3hey HN, supabase ceo here. I'm really excited about this release. 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…
Re: GraphQL is now available on Supabase
#4hey HN, supabase ceo here. I'm really excited about this release. 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…
Re: GraphQL is now available on Supabase
#5I'm the dev lead on pg_graphql. Happy to answer any questions!
Re: GraphQL is now available on Supabase
#6hey HN, supabase ceo here. I'm really excited about this release. 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…
Had a lot of fun collaborating with you on the supabase pg_graphql example, which of course is a HackerNews clone! https://github.com/supabase-community/supabase-graphql-examp...
Also congrats for their own launch today - GraphQL Yoga 2.0: https://www.the-guild.dev/blog/announcing-graphql-yoga-2
[0] The Guild: https://www.the-guild.dev/
Re: GraphQL is now available on Supabase
#7The 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.
Re: GraphQL is now available on Supabase
#8hey HN, supabase ceo here. I'm really excited about this release. 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…
big fan of what you all are doing with this. the one massive need we still have are great user stories and recipes around auth, and some common kinds of things people do with auth, and how it affects mutations, queries, etc. It's all very vague at the moment and the docs don't go into much depth. cheers
pg_graphql filters out any tables/columns that aren't accessible to the user making the request. It also respects your row level security policies.
If you can't see something in the introspection schema, you'll get a friendly error if you try to access it. pg_graphql does not used any privileged access so the queries are being executed in a context that is identical to supabase REST
Re: GraphQL is now available on Supabase
#9I've been using hasura for a long time and this offering from supabase is the first time I've ever thought I could move away from hasura. Looks simply amazing. 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…
We PR'd this into our docker-compose today [0]. We're always a bit slammed during Launch Week, so if you spot any problems let use know and we'll patch it up asap.
The extension is also deployed directly into our PG bundle [1] which is available in docker [2]
> 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?
pg_graphql works with Postgres Row Level Security - we provide a GUI for this in our Dashboard, but they are also just native PG Policies, so you can write them in raw SQL. (I haven't tried Hasura so I don't know if this is a direct comparison.)
[0] https://github.com/supabase/supabase/pull/6138/files#diff-41...
Re: GraphQL is now available on Supabase
#10hey HN, supabase ceo here. I'm really excited about this release. 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…
Off-Topic: How did you create your blog? It's seems like you developed it yourself? I'm currently contemplating on how to create the blog for my product, since I want to have it integrated into the main website as well (as subdirectory). It's not really possible when using third party providers. You always have to use subdomains there.