How is this different than Hasura [pg_graphql] - TagMerge

How is this different than Hasura [pg_graphql]

fabioespinosaAsked 5 months ago

Not a bug, please close this if it's not the space to ask this.

I'm curious in how is this (or will be) different than Hasura?

Source: link

oliriceAnswered 5 months ago

hi @fabioespinosa,

there will be an announcement for this project next week

it does serve the same function as hasura/graphile.

some key differences are:

  • configured/reflected exclusively through sql
  • no external processes/server required
  • no measurable memory/cpu consumption (vs comparable sql queries)
  • language agnostic (enables a hasura/graphile equivalent for any programming language that can talk to postgres)
  • tool chain agnostic (migrations/cli)

hope that helps! i'll add a link to the article once it releases

fabioespinosaAnswered 5 months ago

@olirice thanks for the quick response!

Curious what you guys come up with, and eager to try it :)

oliriceAnswered 5 months ago

Here's the link to the blog post

raartsAnswered 5 months ago

Are subscriptions supported?

oliriceAnswered 5 months ago

Subscriptions support is likely a ways off but we do plan to explore it. We have some ideas from supabase/realtime to try when the time comes

joshua1Answered 5 months ago

blog post

point 2 (no external processes/server required), doesn't seem to be true, looking at the example and the instructions for running it, it seems like a graphql server is required (I don't work with python, just my deduction from the instruction and libs in use). with Hasura, I can connect from my front end app and mobile without the need for a setting up another backend project outside of my hasura docker container .

bnjmnt4nAnswered 5 months ago

it seems like a graphql server is required

I think you might be misinterpreting the example. It only setups a HTTP server using FastAPI and forwards all requests to the database which are handled by pg_graphql.

joshua1Answered 5 months ago

@bnjmnt4n thanks for the quick reply. like I said I don't use python, and it is the only example in there for now. So you are saying that is not required and that I can simply use a graphql client on the front end and connect to a graphql endpoint exposed by the extension?

bnjmnt4nAnswered 5 months ago

You'd still need a server unless your client can connect directly to Postgres.

joshua1Answered 5 months ago

Exactly. Thanks

bnjmnt4nAnswered 5 months ago

Right, I think that point is mentioned more in relevance to Supabase's stack: they already use PostgREST, which provides a RESTful API for Postgres. pg_graphql can be used via PostgREST as well, so there's no need for another service.

joshua1Answered 5 months ago

Thanks, @bnjmnt4n. This is the bit that was mentioned but wasn't shown. I will play with this using the PostgREST endpoint URL. This will be perfect when realtime implementation gets added.

Recent Issues

    Programming Languages