Overview

Hasura is an open-source GraphQL engine that automates the creation of GraphQL APIs from existing or new databases. It connects to various data sources, including PostgreSQL, MS SQL Server, and other REST and GraphQL endpoints, to provide a unified GraphQL API. This approach aims to reduce the backend development effort required to expose data to client applications, facilitating faster iteration and deployment of features.

The core product, Hasura GraphQL Engine, observes database schemas and instantly generates GraphQL queries, mutations, and subscriptions. Subscriptions enable real-time data streaming, making Hasura suitable for applications requiring live updates, such as chat applications, dashboards, or collaborative tools. Developers can use the Hasura Console, a web-based GUI, to manage database schemas, configure relationships, set up authorization rules, and define event triggers. The command-line interface (CLI) supports programmatic configuration, which can be integrated into CI/CD pipelines for automated deployments.

Hasura is particularly effective for use cases involving real-time data applications and scenarios requiring rapid API development. It streamlines the aggregation of data from multiple microservices by providing a single GraphQL endpoint, abstracting the underlying data sources. Its event-driven architecture capabilities allow developers to trigger serverless functions or webhooks in response to database events, facilitating integration with other services and building reactive systems. For example, a new user registration in a database could trigger a welcome email via an event webhook, as described in the Hasura event triggers documentation.

The platform supports a range of database types and offers an abstraction layer that allows frontend developers to interact with data using a standardized GraphQL interface without needing deep knowledge of the specific database technologies. This can accelerate frontend development and simplify data fetching logic. Hasura also provides granular access control, allowing developers to define sophisticated authorization rules at the row and column level based on user roles and session variables.

For deployment, Hasura offers both the self-hostable GraphQL Engine and Hasura Cloud, a managed service. Hasura Cloud handles infrastructure, scaling, and operational aspects, while Hasura Enterprise provides additional features for large organizations, such as advanced security, performance monitoring, and dedicated support. The developer experience is characterized by its ability to provide instant GraphQL APIs over various databases, simplifying data access. Its console offers a GUI for schema management, permissions, and event triggers, and the CLI enables programmatic configuration and CI/CD integration, as noted in the entity payload.

Key features

  • Instant GraphQL APIs: Automatically generates GraphQL queries, mutations, and subscriptions from database schemas (PostgreSQL, MS SQL Server, etc.) and other data sources.
  • Real-time capabilities: GraphQL subscriptions enable live data updates for building real-time applications.
  • Event Triggers: Allows the execution of custom business logic (e.g., webhooks, serverless functions) in response to database events.
  • Remote Schemas: Connects to and merges existing GraphQL APIs into a unified Hasura GraphQL endpoint.
  • Actions: Extends the GraphQL API with custom business logic by connecting to external REST endpoints or serverless functions.
  • Declarative Authorization: Provides granular, role-based access control with row-level and column-level security.
  • Caching: Supports caching mechanisms to improve query performance and reduce database load.
  • Monitoring and Observability: Integrates with popular monitoring tools and provides metrics for performance analysis.
  • Hasura Console: A web-based GUI for schema management, API exploration, and configuration.
  • Hasura CLI: Command-line interface for programmatic configuration and integration with CI/CD pipelines.

Pricing

Hasura offers a free tier for initial development and managed cloud services with tiered pricing. Enterprise solutions are available with custom pricing.

Tier Key Features Pricing Details
Hasura Cloud Free Managed GraphQL Engine, 1M requests/month, 2 GB cache, 2 concurrent subscriptions Free Designed for prototyping and small projects.
Hasura Cloud Professional Includes Free tier features, increased requests (up to 20M/month), 4 GB cache, 10 concurrent subscriptions, analytics, 24/7 support. Starts at $99/month Suitable for production applications requiring higher scale and support.
Hasura Enterprise All Professional features, advanced security, performance monitoring, dedicated support, self-hosting options. Custom pricing Tailored for large organizations with specific compliance and scaling needs.
Pricing as of May 2026. For detailed and up-to-date pricing information, refer to the Hasura pricing page.

Common integrations

  • PostgreSQL: Primary database integration, supporting schema introspection and real-time data. The Hasura PostgreSQL documentation provides setup instructions.
  • Microsoft SQL Server: Connects to MS SQL Server databases to generate GraphQL APIs. Details are available in the Hasura MS SQL Server documentation.
  • REST APIs: Integrates external REST endpoints as Actions or Remote Schemas to unify data under GraphQL.
  • Other GraphQL APIs: Allows merging multiple GraphQL services into a single unified API endpoint using Remote Schemas.
  • Auth Providers: Works with various authentication services (e.g., Auth0, Firebase Auth, custom JWT) for access control.
  • Serverless Functions: Triggers serverless functions (e.g., AWS Lambda, Google Cloud Functions) via Event Triggers or Actions. Google Cloud Functions documentation provides a general guide on event-driven functions.
  • Monitoring Tools: Integrates with tools like Prometheus and Grafana for metrics and performance monitoring. The Prometheus documentation describes its monitoring capabilities.
  • CI/CD Pipelines: The Hasura CLI can be integrated into CI/CD workflows for automated deployments and migrations.

Alternatives

  • Apollo GraphQL: A suite of tools for building and managing GraphQL applications, including client, server, and federation capabilities.
  • Supabase: An open-source Firebase alternative providing a PostgreSQL database, real-time subscriptions, authentication, and instant APIs.
  • AWS AppSync: A managed GraphQL service from Amazon Web Services that simplifies building data-driven applications with real-time and offline capabilities.
  • Strapi: An open-source headless CMS that generates REST and GraphQL APIs for content management.
  • Postgraphile: A tool that creates a GraphQL API directly from a PostgreSQL database by introspecting its schema.

Getting started

To begin using Hasura, you can deploy a new Hasura Cloud project and connect it to a database. Here's a basic example using the Hasura CLI to initialize a project and apply migrations, assuming you have a PostgreSQL database available.

First, install the Hasura CLI:

curl -L https://install.hasura.io | bash

Next, create a new Hasura project directory and navigate into it:

hasura init my-hasura-project
cd my-hasura-project

Connect your Hasura project to a database. For this example, we'll assume a local PostgreSQL database. Update the metadata/databases/databases.yaml file or use the console to add a data source. Then, apply a simple migration to create a table. Create a new migration file:

hasura migrate create init_authors_table --from-file ./sql/create_authors_table.sql

Now, create the file ./sql/create_authors_table.sql with the following SQL:

CREATE TABLE authors (
    id SERIAL PRIMARY KEY,
    name TEXT NOT NULL,
    created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);

Apply the migration to your database:

hasura migrate apply

Start the Hasura Console to manage your API and explore the generated GraphQL schema:

hasura console

This will open the Hasura Console in your browser, where you can see the authors table and start making GraphQL queries. For example, to insert an author:

mutation InsertAuthor {
  insert_authors_one(object: { name: "Jane Doe" }) {
    id
    name
  }
}

And to query authors:

query MyQuery {
  authors {
    id
    name
    created_at
  }
}

For more detailed instructions, refer to the Hasura quickstart guide.