Getting started with the Hasura GraphQL Engine
Tags: graphql, postgres, hasura, tutorial
Published: 2019-12-19 07:22:55

---
title: Getting started with the Hasura GraphQL Engine
published: true
date: 2018-08-23 00:00:00 UTC
tags: graphql, postgres, hasura, tutorial
canonical_url: https://blog.hasura.io/getting-started-with-the-hasura-graphql-engine-29a95ed828c5/
---

![](https://blog.hasura.io/content/images/downloaded_images/getting-started-with-the-hasura-graphql-engine-29a95ed828c5/1-F5dZw0GOTvHUHPA92lxDrg.png)<figcaption>Instant Realtime GraphQL APIs on any Postgres database</figcaption>

## TL;DR

1. [Introducing the Hasura GraphQL Engine](#1)
2. Basic [deployment on Heroku](#2), and connecting to an existing Heroku Postgres database.
3. Basic [deployment using Docker](#3), and integrating with an existing [Postgres database](https://hasura.io/learn/database/postgresql/introduction/).
4. Using the [built-in access control](#4), and a sample [integration with Auth0](#5).
5. [Community resources](#6)

## Introducing the Hasura GraphQL Engine <a name="1"></a>

The Hasura GraphQL Engine is a high performance GraphQL server that gives you instant realtime GraphQL APIs over Postgres.

Hasura helps you build GraphQL apps backed by Postgres or incrementally move to GraphQL for existing applications using Postgres.

Some of Hasura’s features include:

- Works with **existing, live databases** : Point it to an existing Postgres database to instantly get a ready-to-use GraphQL API
- **Realtime** support: Convert any GraphQL query to a live query by using subscriptions.
- **Dynamic access control** that can integrate with your auth system (eg: auth0, firebase-auth).
- Built-in support for **powerful queries** : filtering, pagination, pattern search, bulk insert, update, delete mutations.
- An **Admin Console UI** & Rails-inspired schema migrations
- **Postgres ❤️** : supports [Postgres types](https://hasura.io/learn/database/postgresql/core-concepts/3-postgresql-data-types-columns/) (PostGIS/geo-location, etc.), turns views to _graphs_, trigger stored functions or procedures with mutations.

![](https://blog.hasura.io/content/images/2019/01/0-NokSLz97tUpEh1-v.png)<figcaption>The Hasura Admin Console lets you create and view tables in your Postgres database and query them using the embedded GraphiQL interface.</figcaption>

You can deploy Hasura on either Heroku, or using a Docker container.

## Getting Started with Heroku <a name="2"></a>

Here’s how you can make a basic deployment of Hasura on the Heroku free tier:

{% youtube jUObpSl6dTE %}

If you are already running on Heroku Postgres, Hasura can also connect directly to give you GraphQL APIs. You can get step-by-step instructions [here](https://docs.hasura.io/1.0/graphql/manual/deployment/heroku/using-existing-heroku-database.html).

## Getting started with Docker <a name="3"></a>

To get the Hasura GraphQL engine and a fresh Postgres instance running as Docker containers, simply follow the three steps [here](https://docs.hasura.io/1.0/graphql/manual/getting-started/docker-simple.html). This is the easiest way to setup Hasura in your local environment.

In case you’d like to run Hasura on an existing Postgres database, follow this guide to [deploy the Hasura GraphQL engine as a standalone docker container](https://docs.hasura.io/1.0/graphql/manual/deployment/docker/index.html) and connect it to your Postgres instance.

In this video, we add Hasura to an existing Gitlab instance, and query it using GraphQL:

{% youtube a2AhxKqd82Q %}

## Using the built-in access control system <a name="4"></a>

Hasura comes with a granular, dynamic access control system that can also integrate with existing authentication systems such as Auth0 or custom implementations.

For example, suppose you wish to integrate with Auth0: <a name="5"></a>

{% youtube 15ITBYnccgc %}

Similarly, you can integrate Hasura with other auth providers as well. [This page](https://docs.hasura.io/1.0/graphql/manual/auth/authentication/webhook.html#auth-webhook-samples) has a constantly updated list of sample integrations.

## Community resources <a name="6"></a>

Hasura is an open source project, and you can find the repo [here](https://github.com/hasura/graphql-engine). In case there is a feature you would like to see, or a bug you would like to fix, please create an issue [here](https://github.com/hasura/graphql-engine/issues) (or, submit a pull request 😀).

For more immediate support, you can also join the [Hasura discord](https://discord.gg/hasura).