Hasura is good for rapid development, but it is instant.

Etou Souhei
3 min readJul 16, 2022

Introduction

When you develop a new product, development speed is an essential factor. But, there are many parts to developing products — front-end, Back-end, Infrastructure, Security, etc. So we have to have a method to save time.

This article introduces Hasura to develop the backend quickly.

What are Hasura and its features?

Hasura is a cloud service to develop the backend quickly.

Its great strength is easy to build and connect other services.

Its structure is straightforward. Hasura connects DB that the developer prepared, and we control it through its dashboard to implement API.

Of course, it provides some features to integrate other services.

Actions is the webhook feature. We can configure it when, where, and what.

Hands-on

In order to explain it, I create a simple example.

Its goal is to develop a graphQL schema and test it.

connect DB

At first, connect DB.

Please look at the below image. You can choose the kind of DB and configure your DB connection information.

The kind of DBs that Hasura can connect is

  • postgres
  • MS SQL Server
  • Bigquery (beta)
  • Citus

If you give it a try, I recommend Heroku DB. It is easy and free.

create schema

Next, create a schema.

Hasura’s graphQL schema syncs to Table. So, create DB’s one and, Insert some dummy data.

And then, graphQL query information will appear in explorer tabs.

create query, mutation, subscription

You can test graphQL by Hasura editor.

  • Query: get data from DB
  • Mutation: update data that DB has
  • Subscription: Get real-time updates from DB

How do we use it properly?

What backend sass services have in common is not good at creating complicated business logic compared to developing by programming language. In other words, It isn’t easy to use if a product is grown.

But its graphQL and webhook are fascinating.

Hasura will be one of the choices if you want to create real-time services.

--

--