hasura/graphql-engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

31,925 stars TypeScript 10 components 4 connections

Hasura GraphQL Engine - instant GraphQL APIs on databases with access control

GraphQL queries flow through the engine's parser, validator, and executor, with metadata controlling schema generation and permissions, while CLI tools manage database migrations and deployments

Under the hood, the system uses 3 feedback loops, 4 data pools, 4 control points to manage its runtime behavior.

Structural Verdict

A 10-component fullstack with 4 connections. 4462 files analyzed. Loosely coupled — components are relatively independent.

How Data Flows Through the System

GraphQL queries flow through the engine's parser, validator, and executor, with metadata controlling schema generation and permissions, while CLI tools manage database migrations and deployments

  1. Schema Introspection — Engine reads database schema and generates GraphQL types (config: services.postgres.environment.POSTGRES_DB)
  2. Query Processing — Incoming GraphQL queries are parsed, validated, and planned for execution
  3. Permission Enforcement — Role-based access control filters queries based on metadata configuration
  4. Database Execution — Optimized SQL queries are executed against connected databases (config: services.postgres.ports)
  5. Response Assembly — Results are formatted as GraphQL responses with real-time subscription support

System Behavior

How the system actually operates at runtime — where data accumulates, what loops, what waits, and what controls what.

Data Pools

Migration State (database)
Tracks applied database migrations and current schema version
Metadata Store (database)
Stores GraphQL schema definitions, permissions, and configuration
Static Data Cache (file-store)
Compressed XML test data with JSON schemas for connector testing
Console State (state-store)
Browser localStorage storing UI preferences and transformation configs

Feedback Loops

Delays & Async Processing

Control Points

Technology Stack

Haskell (framework)
Core GraphQL engine implementation
Go (framework)
CLI tools and migration management
TypeScript (framework)
Data connectors and frontend console
React (framework)
Web console user interface
PostgreSQL (database)
Primary database support
GraphQL (framework)
API query language and schema definition
Docker (infra)
Container orchestration and development
Fastify (framework)
HTTP server framework for data connectors
Ace Editor (library)
Code editor component in console
Gin (framework)
HTTP router for CLI API endpoints

Key Components

Sub-Modules

Hasura CLI (independence: high)
Command-line interface for project management, migrations, and metadata operations
Web Console (independence: medium)
React-based administrative interface for managing GraphQL schemas and databases
Data Connector Reference (independence: high)
Reference implementation and test fixtures for data connector protocol
CLI Extensions (independence: high)
Extended CLI functionality for code generation and schema management
V3 Engine (independence: high)
Next-generation GraphQL engine with enhanced connector support

Configuration

docker-compose.yaml (yaml)

sample.hie.yaml (yaml)

contrib/metadata-types/generated/HasuraMetadataV2.py (python-dataclass)

contrib/metadata-types/generated/HasuraMetadataV2.py (python-dataclass)

Explore the interactive analysis

See the full architecture map, data flow, and code patterns visualization.

Analyze on CodeSea

Related Fullstack Repositories

Frequently Asked Questions

What is graphql-engine used for?

Hasura GraphQL Engine - instant GraphQL APIs on databases with access control hasura/graphql-engine is a 10-component fullstack written in TypeScript. Loosely coupled — components are relatively independent. The codebase contains 4462 files.

How is graphql-engine architected?

graphql-engine is organized into 5 architecture layers: GraphQL Engine Core, Web Console, CLI Tools, Data Connectors, and 1 more. Loosely coupled — components are relatively independent. This layered structure keeps concerns separated and modules independent.

How does data flow through graphql-engine?

Data moves through 5 stages: Schema Introspection → Query Processing → Permission Enforcement → Database Execution → Response Assembly. GraphQL queries flow through the engine's parser, validator, and executor, with metadata controlling schema generation and permissions, while CLI tools manage database migrations and deployments This pipeline design reflects a complex multi-stage processing system.

What technologies does graphql-engine use?

The core stack includes Haskell (Core GraphQL engine implementation), Go (CLI tools and migration management), TypeScript (Data connectors and frontend console), React (Web console user interface), PostgreSQL (Primary database support), GraphQL (API query language and schema definition), and 4 more. This broad technology surface reflects a mature project with many integration points.

What system dynamics does graphql-engine have?

graphql-engine exhibits 4 data pools (Migration State, Metadata Store), 3 feedback loops, 4 control points, 3 delays. The feedback loops handle retry and polling. These runtime behaviors shape how the system responds to load, failures, and configuration changes.

What design patterns does graphql-engine use?

5 design patterns detected: Data Connector Protocol, Migration API Pattern, Console Plugin Architecture, CLI Extension System, Multi-Version Support.

Analyzed on March 31, 2026 by CodeSea. Written by .