Hasura GraphQL Engine
Hasura’s open-source v2 engine: point it at Postgres or another supported database and it serves a GraphQL API with queries, mutations and live subscriptions, guarded by role-based row and column permissions.
- What it is
- GraphQL-native databases,Web APIs
- Type
- Open source
- Made by
- Hasura Inc.
- License
- Apache 2.0 (server); Enterprise Edition and Hasura Cloud are commercial
- Facts checked
- 24 October 2026
What it is
The engine, written in Haskell, connects to one or more databases and generates a GraphQL schema from the tables, views and relationships you track, with filtering, sorting, pagination and aggregates. Each GraphQL request becomes a single SQL query that runs in the database, so nested reads don’t turn into one query per row. Permissions are declared per role, per table and per operation: a boolean filter over columns and session variables, such as X-Hasura-User-Id taken from a JWT or an auth webhook, plus the list of columns the role may see, and the engine writes them into that SQL query. Subscriptions come in two kinds. Live queries re-run a query on an interval and push changed results; the engine batches many subscribers with the same query into one SQL statement by passing their variables as rows, and Hasura’s benchmark held one million live queries with Postgres at about 28% load. Streaming subscriptions return only new rows. Around the generated API, Actions add custom logic through HTTP handlers, Remote Schemas merge other GraphQL APIs into one endpoint, Event Triggers call webhooks on inserts, updates and deletes, Scheduled Triggers run on a timer, and RESTified endpoints expose saved queries as REST. Configuration is metadata, managed through an API, the console or the CLI with migrations.
Postgres and compatible databases (including Citus and CockroachDB), SQL Server and BigQuery work in the open-source Community Edition; Snowflake, Amazon Athena, MySQL (in alpha), Oracle, MariaDB and MongoDB need Enterprise. The self-hosted Enterprise Edition adds query caching, read replicas, API limits, allow lists, multiple JWT secrets and OpenTelemetry export. Hasura Cloud runs the engine for you: Free allows 3 million requests and 100 MB of data passthrough a month, Professional removes the database and project limits and charges $0.13 per GB of passthrough, and Enterprise adds SSO, failover and VPC peering. Hasura DDN, built on a new Rust engine, is the company’s successor product, and since June 2025 its focus has been PromptQL; Hasura said the v2 engine would continue to be hosted and maintained, and it still ships releases, with 2.51.2 on 23 October 2026.
Why teams pick it
- A full GraphQL API from an existing database with no resolvers to write, and one SQL query per request instead of N+1 queries
- Row and column permissions as declarative rules that use session variables from your auth system
- Live queries scale by batching many subscribers into one SQL statement, so realtime UIs don’t need a separate change feed
- Actions, Remote Schemas and Event Triggers add business logic and side effects without forking the engine
Watch out for
- No longer Hasura’s main product: the company’s focus moved to DDN and then PromptQL, and v2 is maintained rather than promoted, though it still gets regular releases
- Live queries poll the database on an interval and refetch whole results, which adds latency when writes are rare
- Feature support varies by database: BigQuery has no mutations or subscriptions, event triggers work only on Postgres and SQL Server, and several databases need Enterprise
- Caching, read replicas, API limits and OpenTelemetry need Enterprise Edition or Hasura Cloud
- Query language
- Generated GraphQL: queries, mutations, live and streaming subscriptions
- Client protocol
- GraphQL endpoint, plus RESTified endpoints for saved queries
- Written in
- Haskell
- Ways to run it
- Self-hosted Community or Enterprise Edition (Docker), or Hasura Cloud
- Pricing model
- Cloud: Free up to 3 million requests a month; Professional $0.13 per GB of passthrough
Alternatives
What all graphql-native databases have in common →Compare side by side →How it fits with other technologies
What Hasura GraphQL Engine uses
- Hasura GraphQL Enginegenerates its GraphQL API fromPostgreSQL
- Hasura GraphQL Engineserves its generated API overGraphQL
- Hasura GraphQL Engineis the v2 predecessor ofHasura DDN
- Hasura GraphQL Engineserves read-only GraphQL overGoogle BigQuery
- Hasura GraphQL Enginegenerates a GraphQL API overCockroachDB
- Hasura GraphQL Engineis written inHaskell
- Hasura GraphQL Engineships as an image forDocker
A select permission in table metadata: users read only the rows they added · yaml
- table:
schema: public
name: products
select_permissions:
- role: user
permission:
columns: [id, name, description, price, added_by_user_id]
filter:
added_by_user_id:
_eq: X-Hasura-User-Id # session variable from the JWTSee it in a real stack
No architecture uses Hasura GraphQL Engine yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2018–2026
Hasura first added GraphQL to the data APIs of its Kubernetes platform, then pulled it out as a standalone product. The open-source GraphQL Engine launched on 10 July 2018 with “instant realtime GraphQL APIs on a Postgres database”, using about 50 MB of RAM, and in August 2018 any query could be turned into a subscription.
Hasura 2.0, released on 23 February 2021, connected several databases to one instance at once, added SQL Server and BigQuery, created REST endpoints from GraphQL templates, extended authorization to remote GraphQL services and added metadata APIs and a maintenance mode for upgrades.
In June 2023 Hasura announced the Data Delivery Network with a v3 engine rewritten in Rust, and on 2 June 2025 it made PromptQL its focus, saying the GraphQL Engine and DDN would continue to be hosted and maintained. The v2 server kept receiving releases through 2026.
Why it’s built this way
- Compile each GraphQL request into one SQL query
- Resolving fields one by one would send many small queries to the database. Compiling the whole request, permissions included, lets Postgres plan it once.
- Poll and batch live queries instead of listening for changes
- Postgres LISTEN/NOTIFY can drop events and logical replication slots are costly or unavailable on managed databases, so the engine refetches on an interval and batches subscribers; the stated trade-off is latency when writes are few.
- Permissions as metadata, not code
- A permission is a boolean expression plus a column list, so the engine can put it into the generated SQL and the same rules apply to queries, mutations and subscriptions.
- Configuration through metadata APIs
- Hasura 2.0 made configuration API-driven so tools could manage changes, inspect them and move them between environments.
Timeline
- 2018
GraphQL Engine launches for Postgres in July; subscriptions in August
- 2021
Hasura 2.0: multiple databases, SQL Server, BigQuery, REST endpoints
- 2023
Hasura DDN and a Rust v3 engine announced
- 2025
Company focus moves to PromptQL; v2 to be maintained
- 2026
v2.51.2 released on 23 October
- Hasura blog: Introducing the Hasura GraphQL Engine (10 Jul 2018, updated Aug 2018)
- Hasura blog: Announcing Hasura GraphQL Engine 2.0 (23 Feb 2021)
- Hasura blog: Hasura Data Delivery Network and other big news at HasuraCon 2023 (21 Jun 2023)
- Hasura blog: From GraphQL to PromptQL, a new chapter begins (2 Jun 2025)
- GitHub: hasura/graphql-engine releases (v2.51.2, 23 Oct 2026)
- GitHub: hasura/graphql-engine architecture notes on live queries
Sources12 · facts checked 24 October 2026
- Hasura v2 docs: introduction (GraphQL API, permissions, actions, remote schemas, editions)
- Hasura v2 docs: supported databases
- Hasura v2 docs: database feature support matrix
- Hasura v2 docs: permissions (one SQL query per request, boolean expressions and column selections)
- Hasura v2 docs: row-level permissions (X-Hasura-User-Id example)
- Hasura v2 docs: subscriptions (live queries and streaming)
- GitHub: hasura/graphql-engine architecture notes on live queries (batching, polling, 1 million live queries)
- Hasura v2 docs: Enterprise Edition features
- Hasura v2 docs: Hasura Cloud plans
- Hasura v2 docs: quickstart with Docker Compose
- GitHub: hasura/graphql-engine (Apache 2.0 for the v2 server; Haskell source in server/)
- Hasura blog: From GraphQL to PromptQL, a new chapter begins (2 Jun 2025)