Databases
Introduction
The Hasura GraphQL engine automatically generates your GraphQL schema and resolvers based on tables/views in your database . You don't need to write a GraphQL schema or resolvers. See How Hasura GraphQL engine works for more details.
The Hasura console gives you UI tools that speed up your data-modelling process, or working with your existing databases. The console also automatically generates migrations or metadata files that you can edit directly and check into your version control.
Supported databases
Hasura GraphQL engine supports:
- Postgres
- MS SQL Server
- Citus / Hyperscale
- BigQuery
- MySQL (in preview) - See the preview guide
Feature support
The below matrices show the database wise support for the different GraphQL features under schema, queries, mutations and subscriptions.
Schema
Postgres | Citus | SQL Server | BigQuery | |
---|---|---|---|---|
Table Relationships | ✅ | ✅ | ✅ | ✅ |
Remote Relationships | ✅ | ✅ | ✅ | ✅ |
Views | ✅ | ✅ | ✅ | ❌ |
Functions | ✅ | ✅ | ❌ | ❌ |
Enums | ✅ | ✅ | ❌ | ❌ |
Computed Fields | ✅ | ✅ | ❌ | ❌ |
Data Validations | ✅ | ✅ | ✅ | ✅ |
Relay Schema | ✅ | ✅ | ❌ | ❌ |
Queries
Postgres | Citus | SQL Server | BigQuery | |
---|---|---|---|---|
Simple | ✅ | ✅ | ✅ | ✅ |
Nested Object | ✅ | ✅ | ✅ | ✅ |
Aggregation | ✅ | ✅ | ✅ | ✅ |
Filter / Search | ✅ | ✅ | ✅ | ✅ |
Sort | ✅ | ✅ | ✅ | ✅ |
Distinct | ✅ | ✅ | ✅ | ✅ |
Paginate | ✅ | ✅ | ✅ | ✅ |
Multiple Args | ✅ | ✅ | ✅ | ✅ |
Multiple Queries | ✅ | ✅ | ✅ | ✅ |
Variables / Aliases / Fragments | ✅ | ✅ | ✅ | ✅ |
Mutations
Postgres | Citus | SQL Server | BigQuery | |
---|---|---|---|---|
Insert | ✅ | ✅ | ✅ | ❌ |
Upsert | ✅ | ✅ | ✅ | ❌ |
Update | ✅ | ✅ | ✅ | ❌ |
Delete | ✅ | ✅ | ✅ | ❌ |
Multiple per Request | ✅ | ✅ | ❌ | ❌ |
Subscriptions
Postgres | Citus | SQL Server | BigQuery | |
---|---|---|---|---|
Value of Field | ✅ | ✅ | ✅ | ❌ |
Updates to Rows | ✅ | ✅ | ❌ | ❌ |
Value of Derived Field | ✅ | ✅ | ✅ | ❌ |
Additional Resources
Get Started with Hasura today - Watch video guide.