How to Create a Scalable and extensible Back-End instantly with HASURA — Part 1

Anass ELBAZ
3 min readMay 7, 2020

Introduction

In this tutorial, I will show you how to create a complete Back-End from scratch, using Hasura.

Data Workflow

Hasura is an open source engine that connects to your databases & microservices and auto-generates a production-ready GraphQL backend.

It uses Real-time GraphQL on PostgreSQL, like the image ←←← visualise.

Step #1: Create the HASURA API & Deploy it in HEROKU

→ Go to https://hasura.io/

→ Click the green button Try…on HEROKU.

→ Then click Deploy to Heroku.

→ Enter the name of the application, in my case I did movies-space, then click Deploy app.

→ We click View, and here we GOOO, our Back-End Application is created with HASURA and deployed into HEROKU.

Step #2: Create data

We move into the DATA panel

And we create a table by clicking on the yellow button. After we tape the table name, we must declare some columns of the table.

In the Frequently used columns we find some popular column declarations, and we complete the other declarations ourselves :

j

Notice:

I selected id as a Primary Key.

This is a simple table of movies,

Now, we are able to add data to our movie table like that :

Step #3: Query data with GraphiQL

We go to the panel GRAPHIQL :

Then We can construct the GraphiQL Query in the Explorer, we select attributes that we want to query

And BOOM …

In the next part, I will build the client (Front-End) for this API …

--

--