Hasura

Hasura

Instant GraphQL and REST APIs on your database

Features

  • Auto-generates GraphQL API from database schema
  • Real-time subscriptions out of the box
  • Role-based access control at the row level
  • Remote schema stitching and actions for custom logic

Pros

  • Instant API from existing databases — zero backend code
  • Built-in authorization with granular permissions
  • Real-time subscriptions without additional infrastructure

Cons

  • Complex business logic requires external services (actions)
  • Tight coupling between database schema and API
  • Learning curve for advanced permission configurations

Overview

Hasura is a GraphQL engine that connects to your existing databases and auto-generates a complete GraphQL API with queries, mutations, and real-time subscriptions. It turns your PostgreSQL (and other) databases into instant, production-ready APIs without writing backend code.

Hasura provides a powerful role-based access control system that lets you define granular permissions at the row and column level. For custom business logic beyond CRUD operations, you can extend the API with Actions (webhooks), Remote Schemas, and Event Triggers.

When to Use

Hasura is ideal when you want to rapidly build a data-driven API from an existing database, when you need real-time subscriptions with minimal setup, or when your API is primarily CRUD operations with row-level security. For complex business logic, pair it with serverless functions.

Getting Started

# Docker quickstart
docker run -d -p 8080:8080 \
  -e HASURA_GRAPHQL_DATABASE_URL=postgres://user:pass@host:5432/db \
  -e HASURA_GRAPHQL_ENABLE_CONSOLE=true \
  hasura/graphql-engine