Skip to content

Hasura's GraphQL Engine

Siddhant Srivastav edited this page Jan 28, 2019 · 3 revisions

The Hasura GraphQL Engine is an extremely lightweight, high-performance product that gives you instant realtime GraphQL APIs on a Postgres database. This can be used to quickly build new applications on Postgres or fast-track the move to GraphQL for existing applications on Postgres.

It comes with a UI that lets you create and view tables on your database and make GraphQL queries using the embedded GraphiQL interface.

How we used it?

Writing API endpoints with Hasura and GraphQL

Writing Queries, mutations and subscriptions are pretty easy and can be done quite easily. The concept behind writing these methods is that, these methods are used to communicate with your backend database. These are similar to writing SQL queries, like SELECT * FROM Table_name on the backend to communicate with the backend. Here, the backend layer is completly removed and the database is exposed to these endpoint. So we write the queries in the frontend by specifying the type of queries/mutations, the variables related to them and what column values we want in return.

The detailed explaination of writing methods are given below: