Hasura is an application which gives you an instant GraphQL/REST API based on your database schema. As of writing it supports Postgresql, SQL Server and Big Query databases but MySQL, Oracle and Elastic are also in the pipeline. You can use it for a rapid prototyping as well as production deployments as it can be scaled horizontally and has very good performance characteristics. If you are wondering - it is written in Haskel, and it’s very likely it will run much faster than your regular Django app.
Over the past few years, it has enjoyed a lot of adoption in the industry ie. Walmart, Atlassian, Netlify to name the few.
At Bravelab we believe it will play an important role as one of the tools improving development and time to market speeds. In fact Hasura team estimates that adopting it cuts down on development time by 50-80% according to their studies. Anything that’s saving you that much time is worth a try, right ?
This is usually the first question - after all we are used to writing a lot of code. Hasura’s philosophy sits nicely in line with my personal view of how we should be writing an applications:
On the django side let’s write a simple django view which will return json data.
We also need to expose this view in urlpattrens
On the Hasura side we need to define a custom action with request and response types.
Now we can proxy the request to our backend service.
Deploying Hasura usually consists of two stages. Firstly, we need to export our local configuration to yaml files. Once you’ve crafted the exact setup you can use gui or command line command for exporting ie.
This will create a directory in your project called metadata. You should version control this directory just as in your django project. Then to apply this configuration on a remote hasura instance you need to run
This could be run as github action or on your local machine. As an example we have created very simple github action that deploys checked in files to the remote hasura node.
At Bravelab, we really care about delivering the best solution in the quickest possible manner. Over the years, we have been crafting API’s and backends by hand but with the arrival of modern no-code tooling like Hasura it’s becoming more and more apparent we want to be solving problems and not reinventing the wheel. We have chosen this solution because with a bit of configuration it takes away all these repetitive tasks from developers and let them focus on more challenging aspects of the project. Also for our clients it’s a great tool for integration with perhaps legacy systems and payment gateways. Overall our experience of using it has been great so far!
At Brave we specialise in IT Staff Augmentation, and Software Development Consulting. We help you to get your project done.