News for hackers. Stuff that matters.

GraphQL and PostgreSQL as a managed back end?

Graphql is amazing but can be complicated to setup. Postgraphile, give you a Graphql server ready to go but still complicated to understand and maintain. What if you could just have a managed backend backed by Postgraphile and Postgresql that allows you to quick start applications with Graphql, managed authentication, sessions and asynchronous tasks?
( 11 comments | 14 points | on HN )
Re:GraphQL and PostgreSQL as a managed back end? by linkdd on Tuesday November 30, 2021 @05:04AM (#29390595)
Take a look at https://hasura.io
Re:GraphQL and PostgreSQL as a managed back end? by niolap on Tuesday November 30, 2021 @06:22AM (#29390992)
Indeed but I don't see Postgresql hosting included in their plan. I'm thinking more into a fully managed backend solution including Postgresql, auth, async tasks, Recaptcha to protect public mutation. This would be backed by postgraphile that is open source and quite powerful.
Re:GraphQL and PostgreSQL as a managed back end? by linkdd on Tuesday November 30, 2021 @06:36AM (#29391057)
Hasura supports authentication and ACLs with the builtin PostgreSQL user system. And we use Kratos (from the ory.sh ecosystem) for OAuth.

It supports PostgreSQL triggers, and webhooks so you can implement your own business logic.

Hasura is open source and provide way more features than postgraphile. IIRC, their SaaS offering includes a PostgreSQL.

It's a wonderful piece of technology that covers 95% of your needs. They also provide a complete docker-compose so you can start tinkering with it on your dev host.

Re:GraphQL and PostgreSQL as a managed back end? by niolap on Friday December 03, 2021 @03:14AM (#29427758)
And what you think about https://supabase.io/? They have a managed PostgreSQL and managed Auth.
Re:GraphQL and PostgreSQL as a managed back end? by bionhoward on Tuesday November 30, 2021 @07:34AM (#29391433)
I don’t think you can get around SQL (in my industry of healthcare) because most of the middleware API generators do the fine grained row level access controls at the API layer. They take over your DB schema without using it for security features, so you have to go in and write SQL either way. That was what turned me off to Hasura a while ago. Their Auth system is fantastic, but it didn’t at the time live in the database, so it didn’t meet my use case. Still a great way to get going and I’m sure folks can figure out how to enable security on the database side if they try. I’m a simpleton and just use SQL
Re:GraphQL and PostgreSQL as a managed back end? by niolap on Tuesday November 30, 2021 @09:30AM (#29392469)
Why would you like to have the Auth system in the database?
Re:GraphQL and PostgreSQL as a managed back end? by tbrock on Tuesday November 30, 2021 @07:28AM (#29391389)
Re:GraphQL and PostgreSQL as a managed back end? by niolap on Tuesday November 30, 2021 @09:33AM (#29392498)
You prefer postgrest API over Grapql?
Re:GraphQL and PostgreSQL as a managed back end? by Maka_buka on Thursday December 02, 2021 @07:31AM (#29415294)
if you just need to "translate" graphql query to sql-query (ir doesn't matter is it mssql or PostgreSQL) - you may take a look NReco.GraphQL (which is based on GraphQL.Net engine). Ofc, if you have .Net stack - https://www.nuget.org/packages/NReco.GraphQL/
Re:GraphQL and PostgreSQL as a managed back end? by bnchrch on Tuesday November 30, 2021 @09:11AM (#29392253)
Hasura is fantastic. While they don’t manage Postgres they do give you a one click deploy to Heroku.

Overall it’s a fantastic tool

Re:GraphQL and PostgreSQL as a managed back end? by niolap on Tuesday November 30, 2021 @09:29AM (#29392460)
Fantastic only because you have Graphql environment few second?