Overview
Hasura is a backend as a service that automatically provisions an instant GraphQL API over new or existing databases. It is designed to streamline data access for application development by eliminating the need to write custom API resolvers for common database operations. The platform supports various data sources, including PostgreSQL, SQL Server, and BigQuery, allowing developers to connect their existing data infrastructure and expose it through a unified GraphQL endpoint.
Hasura's core functionality revolves around its GraphQL engine, which can introspect database schemas and generate a production-ready GraphQL API with queries, mutations, and subscriptions. Subscriptions enable real-time data capabilities, allowing client applications to receive live updates when data changes in the underlying database as described in the Hasura documentation. This feature is particularly useful for applications requiring live dashboards, chat functionalities, or collaborative tools.
The platform is optimized for rapid application development and microservices data aggregation. Developers can use Hasura to quickly build backend APIs for web, mobile, and other client applications, reducing the time and effort typically spent on API boilerplate. It integrates with authentication systems like Auth0, Firebase Auth, and custom JWTs, providing granular access control through its permission system as detailed in the authentication documentation. This allows developers to define rules based on user roles and data attributes, ensuring that clients only access authorized information.
Hasura offers both a managed cloud service, Hasura Cloud, and an open-source self-hosted version. Hasura Cloud provides a fully managed environment with features like automatic scaling, high availability, and monitoring. For organizations with specific deployment requirements or those needing enhanced control, Hasura Enterprise provides additional features such as advanced caching, distributed tracing, and more extensive security configurations. The developer experience is enhanced by the Hasura Console, a web-based UI that allows developers to manage their database schema, explore the GraphQL API, and configure permissions visually.
Key features
- Instant GraphQL APIs: Automatically generates GraphQL APIs from connected databases and microservices without manual coding as outlined in the data section.
- Real-time Data via Subscriptions: Provides real-time data access through GraphQL subscriptions, enabling live updates for client applications.
- Data Aggregation: Unifies data from multiple sources, including databases and other APIs, into a single GraphQL endpoint.
- Fine-grained Access Control: Offers a robust permission system to define authorization rules based on user roles and data attributes.
- Database Migrations: Supports schema migrations through its CLI and console, allowing for version control of database changes.
- Event Triggers: Allows developers to define actions that are triggered by database events, facilitating asynchronous workflows and integrations.
- Remote Schemas and Actions: Enables the integration of custom GraphQL resolvers and REST APIs into the Hasura GraphQL schema for extended functionality.
- Caching: Provides caching mechanisms to improve API response times and reduce database load, especially for frequently accessed data.
- Observability: Offers monitoring tools and integration with tracing systems for performance analysis and debugging.
Pricing
Hasura offers a free tier for its cloud service, with paid plans based on usage and feature requirements. Enterprise-grade features are available through custom pricing. Pricing information is current as of May 2026.
| Plan Name | Key Features | Price (Monthly) |
| Hasura Cloud Free Tier | 1 GB data transfer, 1 GB database storage, 1M API requests/month | Free |
| Hasura Cloud Standard | Increased data transfer, API requests, dedicated instances, 24/7 support | Starts at $39 |
| Hasura Enterprise | Advanced security, performance optimizations, custom SLAs, dedicated enterprise support | Custom Pricing |
For detailed and up-to-date pricing, refer to the official Hasura pricing page.
Common integrations
- PostgreSQL: Primary database integration, supporting instant GraphQL APIs over existing or new PostgreSQL instances as described in the PostgreSQL connector documentation.
- Authentication Providers: Connects with services like Auth0, Firebase Authentication, and custom JWT providers for user authentication.
- Serverless Functions: Integrates with serverless platforms such as AWS Lambda or Google Cloud Functions via event triggers and remote schemas.
- Microservices: Aggregates data from various microservices using remote schemas, consolidating multiple APIs into a single GraphQL endpoint.
- Data Warehouses: Can connect to data warehouses like Google BigQuery to expose historical data through GraphQL as supported by the BigQuery connector.
- Stripe: Integrations can be built to trigger events on Stripe webhooks, updating database records through Hasura mutations. For example, a successful payment event from Stripe's API could trigger a Hasura mutation to update an order status.
Alternatives
- GraphCMS (Hygraph): A headless CMS that uses GraphQL, offering content management and API delivery with a focus on structured content.
- Supabase: An open-source Firebase alternative providing a PostgreSQL database, real-time subscriptions, authentication, and an auto-generated API.
- AWS AppSync: A fully managed GraphQL service from Amazon Web Services that enables developers to create flexible APIs to securely access, manipulate, and combine data from one or more data sources.
Getting started
To get started with Hasura, you typically set up a Hasura instance (either cloud or self-hosted) and connect it to a database. The following JavaScript example demonstrates how to query data from a Hasura GraphQL API after it has been configured with a database table, assuming a table named authors with a name column exists.
async function fetchAuthors() {
const HASURA_API_URL = 'YOUR_HASURA_ENDPOINT'; // Replace with your Hasura GraphQL endpoint
const ADMIN_SECRET = 'YOUR_HASURA_ADMIN_SECRET'; // Replace with your admin secret if authentication is enabled
const query = `
query {
authors {
id
name
}
}
`;
try {
const response = await fetch(HASURA_API_URL, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-hasura-admin-secret': ADMIN_SECRET // Include if admin secret is required
},
body: JSON.stringify({ query })
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Authors:', data.data.authors);
return data.data.authors;
} catch (error) {
console.error('Error fetching authors:', error);
}
}
fetchAuthors();
This code snippet sends a GraphQL query to a Hasura endpoint to fetch all authors from an authors table. You would replace 'YOUR_HASURA_ENDPOINT' and 'YOUR_HASURA_ADMIN_SECRET' with your actual Hasura instance details. For comprehensive setup instructions, including connecting to a database and defining schema, refer to the Hasura Getting Started guide.