Setting up a production ready realtime GraphQL backend in just a few minutes

23 November, 2018 | 2 min read

Announcing the DIY Realtime GraphQL BaaS using Hasura, DigitalOcean and Auth0

Since Facebook announced GraphQL three years ago, GraphQL popularity has grown by leaps and bounds. In the 2018 state of javascript survey, 83% of JS developers had either used GraphQL or wanted to learn it, and it is well on its way to becoming a megatrend.

npm trends for GraphQL

Adopting GraphQL can result in a significant increase in feature velocity, and any organization looking at new product development or re-architecting their existing products should seriously evaluate GraphQL and the benefits that it brings.

Getting started with GraphQL quickly

At Hasura, we have just released the DIY Realtime GraphQL BaaS. It uses the Hasura GraphQL Engine, Auth0 and DigitalOcean, to help you setup a production ready GraphQL backend in a few minutes — sort of like Firebase, but for realtime GraphQL, over Postgres, on your own infrastructure. It offers you the ease of use of a BaaS (set up in a few minutes), while allowing you to retain flexibility and control going forward.

Here’s how you can set it up:

  1. Deploy the Hasura GraphQL engine on DigitalOcean using the one-click deploy. It comes with a Postgres database and Caddy webserver for easy and automatic HTTPS using Let’s Encrypt.
Deploy Hasura GraphQL on DigitalOcean

2) Create your schema using the Hasura console. The Hasura GraphQL Engine will give you instant GraphQL APIs, for queries, mutations and subscriptions.

Create schema

3) Configure Auth0 rules and callback URLs, and integrate it with Hasura.

Configure access control rules

And that’s it! You have a full-fledged backend with GraphQL APIs and Authentication/authorization on managed infrastructure. On the 5$ machine, you should be able to handle thousands of users. Of course, if you want to handle more users, you can just upgrade the underlying infra.

We have used DigitalOcean and Auth0 for this example for their ease of use, you can use any other infrastructure provider or authentication provider.

Next steps

Once you have the BaaS setup, there are tons of other cool things you can do as you build complex applications, and take them to production:

If you get stuck somewhere or you have some questions, feel free to talk to us on our Discord.

Close

Get Started with GraphQL Now

Hasura Cloud gives you a fully managed, production ready GraphQL API as a service to help you build modern apps faster.

HasuraCon, Our user conference is back!

We’re bringing together users from all over the world for a 2 day celebration of all things Hasura!
Discover the amazing products developers are building with Hasura. Level up your Hasura skills with live, in-depth workshops. Hear about all the big features and updates we are making to the Hasura GraphQL Engine and Hasura Cloud. Join us on 23rd & 24th June 2021!

Praveen Durairaju

Praveen Durairaju

Application Engineer. Tech Enthusiast. Follow on Twitter - https://twitter.com/@praveenweb

Read More

hand
Ready to get started?
Start for free on Hasura Cloud or you could contact our sales team for a detailed walk-through on how Hasura may benefit your business.
Stay in the know
Sign up for full access to our community highlights, new features, and occasional baby animal gifs! Oh, and we have a strict no-spam rule. ✌️