In this post, we will look at some access control patterns that can be used with Hasura to granularly allow/restrict the data. This is a summary blog post from Hasura Streams and the video has been uploaded to Youtube. If you prefer watching, similar examples have been covered in this video:

Hasura GraphQL Engine

Hasura GraphQL Engine is a thin GraphQL server that sits on any Postgres database and allows you to CRUD the data with realtime GraphQL and access control.

This post assumes that you have basic understanding of Hasura and relational data models.

Here’s how I used GraphQL to build an image processing app that converts an image to sepia asynchronously


  • Image processing is best done asynchronously so that the state is not lost when the app is refreshed
  • Serverless functions can be used to run the image processing logic
  • Realtime GraphQL helps you be in sync with the processing state
  • Hasura GraphQL Engine gives instant realtime GraphQL APIs over Postgres
  • Source code: client, image processing logic


In this post we’ll build a basic image processing app that lets you upload an image and add a sepia tone to it asynchronously. …

Use GraphQL as a data source to build realtime charts with ChartJS

We started using ChartJS with GraphQL so that we could leverage GraphQL’s realtime subscriptions to build realtime charts. Soon enough we realised that we can automate this process of restructuring the GraphQL data to a form that ChartJS expects.

graphql2chartjs is an open source tool that reshapes your GraphQL data as per the ChartJS API. This makes building charts as easy as simply making a GraphQL query.

The idea behind this tool is to generate ChartJS compliant data object from your GraphQL response by simply adding a few aliases in your GraphQL query.

Check out a live demo here.

Usage with Hasura


Instant Realtime GraphQL APIs on any Postgres database


  1. Introducing the Hasura GraphQL Engine
  2. Basic deployment on Heroku, and connecting to an existing Heroku Postgres database.
  3. Basic deployment using Docker, and integrating with an existing Postgres database.
  4. Using the built-in access control, and a sample integration with Auth0.
  5. Community resources

Introducing the Hasura GraphQL Engine

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…

Rishichandra Wawhal

I like to write code and lift heavy things

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store