back arrow

My experience with Hasura and Postgraphile

08 - 07 - 2022

It’s still to soon to say which one is definite winner but one thing I can say for sure is that hasura is more expensive than postgraphile. But of course hasura do more things for me than postgraphile.

So recently I have an awesome opportunity to work with… well I don’t know what to call it and I’m not sure there is the word for it. Basically these two pieces of tech do one thing (at least for me) which is to strap a graphql server with a PostgreSQL database. Your input is a PostgresSQL database and you output is a graphql api server, ready for integration. Easy, simple and performant (in case of hasura after payment of course), that’s what every start-up want.

After playing for a whole day with this one hour tutorial about postgraphile - a lovely open source (and you can pay if you want to support it and need more help), things became straight forward for me . I really like its middleware approach maybe due to the fact that express is my very first node framework. But it seems effortful in term of deployment to the cloud, so my Tech Lead put it aside.

We decided to go with hasura. The architecture is somewhat like the picture below:

app structure

This structure would have been more natural with postgraphile, but I might misinterpret the features. We may not need to validate data that often for our current scope. Who knows?

Thank to a senior member (of both experience and age) from our team, the repo was setup and thank to my short experience with postgraphile, I have managed to do migration and seed data with some successes. I get fond of hasura-cli to a certain extent. During that process I am reminded that docker runs a bit better with linux than OSX, but the host.internal thing was annoying. I love to get better at docker.