Getting started with GraphQL APIs on Heroku

The open source Hasura GraphQL Engine gives you high performance GraphQL APIs over Postgres. Deploy it to the Heroku free tier in 30 seconds.

Hasura
HackerNoon.com
Published in
2 min readJul 19, 2018

--

Get started with GraphQL in just 30 seconds with Hasura GraphQL Engine on Heroku

At Hasura, we have always been huge fans of Heroku’s git push based deployment workflow. All of our engineers have, at some point, had side projects running with Heroku, and one of our most popular open source projects, Gitkube, brings the Heroku workflow to a Kubernetes cluster.

Our aim with the Hasura GraphQL Engine is to help you setup a GraphQL server with the least amount of friction, so that you can start building applications without any setup. With that in mind, we present the Hasura deployment on Heroku’s free tier.

30 seconds to GraphQL zen!

Basic deployment of the Hasura GraphQL Engine on Heroku

Importing your own data

In case you already have data, Hasura allows you to import it and begin using GraphQL queries instantly. Here’s how:

Import your existing Postgres database and get GraphQL APIs with Hasura

(For this demo, we used the freely available Chinook data set)

Bonus: Connecting your existing Heroku Postgres

We designed Hasura to allow developers running existing Postgres based applications to migrate to GraphQL without having to write any backend code.

If you are already running on Heroku Postgres, Hasura can connect directly to give you GraphQL APIs. You can get step-by-step instructions here.

Architected for high performance

While designing Hasura, we had two objectives:

  1. Hasura should be able to run anywhere, from your local machine to the Heroku free tier to a server on Amazon, Google or Microsoft.
  2. You should be able to extract maximum performance/dollar.

Consequently, we optimised Hasura for low memory footprint & low latency.

Hasura GraphQL Engine gives you ~600 req/s while consuming only 50 MB of RAM on Heroku’s free tier

We have written about the design decisions involved in this blogpost.

🎉🎉Hasura GraphQL Engine is open source!🎉🎉

We have just open sourced the Hasura GraphQL Engine. Check out the complete repo on Github, and let us know your thoughts! We would love to hear from you- we are very active on our discord server.

Hasura gives you instant GraphQL APIs over any Postgres database without having to write any backend code.

If you would like to stay updated on all things Hasura, you can sign up for our newsletter.

--

--

Hasura
HackerNoon.com

⚡️ Instant realtime GraphQL APIs! Connect Hasura to your database & data sources (GraphQL, REST & 3rd party API) and get a unified data access layer instantly.