Compiled GraphQL execution engine. Define schemas in Python or TypeScript, compile to optimized SQL at build time, execute with predictable sub-10ms latency.
Where Hasura and PostGraphile interpret GraphQL at request time, FraiseQL generates deterministic SQL templates during compilation, achieving zero runtime query planning overhead for known query patterns.
# 1. Define schema (Python)
import fraiseql
@fraiseql.type
class User:
id: int
name: str
email: str
@fraiseql.query
def users(limit: int = 10) -> list[User]:
return fraiseql.config(sql_source="v_user", returns_list=True)
fraiseql.export_schema("schema.json")# 2. Compile
fraiseql-cli compile schema.json -o schema.compiled.json
# 3. Run
fraiseql-server --config fraiseql.toml --schema schema.compiled.json
# 4. Query
curl -X POST http://localhost:8080/graphql \
-H "Content-Type: application/json" \
-d '{"query": "{ users(limit: 5) { id name email } }"}'-
Compile-time SQL generation. Zero runtime overhead for deterministic queries. Your schema is analyzed once at build; queries execute without interpretation.
-
Schema-as-code authoring. Define schemas in Python or TypeScript with decorators, compile to optimized JSON. No runtime language bridge, no FFI.
-
Multi-database from one schema. PostgreSQL, MySQL, SQLite, SQL Server from a single compiled schema. Per-database SQL generation, not ORM translation.
Traditional GraphQL: Schema + Query -> Parse -> Plan -> SQL -> Execute -> Serialize
~~~~~~~~~~~~~~ runtime overhead ~~~~~~~~~~~~~~
FraiseQL: Compiled Schema -> SQL Template -> Execute -> Serialize
~~~~ zero planning overhead ~~~~
Benchmarks: crates/fraiseql-core/benches/ (Criterion, reproducible).
Authoring (Python/TS) Compilation (Rust) Runtime (Rust)
| | |
schema.json + fraiseql.toml -> schema.compiled.json -> Server
(types) (config) (types + SQL templates) (execute)
Python and TypeScript are authoring languages only. The runtime is pure Rust with zero language bridge overhead.
| Database | Status | Feature Flag |
|---|---|---|
| PostgreSQL | Primary | postgres (default) |
| MySQL | Supported | mysql |
| SQLite | Supported | sqlite |
| SQL Server | Supported | sqlserver |
| Tier | Languages |
|---|---|
| Tier 1 (Supported) | Python, TypeScript, Java, Go |
| Tier 2 (Maintained) | PHP, Rust |
Rust applications:
[dependencies]
fraiseql = { version = "2.0.0-beta.3", features = ["server"] }Schema authoring:
pip install fraiseql # Python
npm install fraiseql # TypeScriptFeature flags:
| Feature | Use Case |
|---|---|
postgres (default) |
PostgreSQL only |
mysql, sqlite, sqlserver |
Additional databases |
server |
HTTP GraphQL server |
observers |
Post-mutation event hooks |
arrow |
Apache Arrow Flight for analytics |
wire |
Streaming JSON over PostgreSQL wire protocol |
full |
All features |
All queries are parameterized at compile time. Zero unsafe code (forbidden). Additional enterprise features:
- OAuth2/OIDC authentication (7+ providers)
- Field-level authorization and encryption-at-rest
- Audit logging (file, PostgreSQL, Syslog)
- Rate limiting on auth endpoints
- Error sanitization (no implementation details leaked)
- Constant-time token comparison
See Security Checklist for production hardening.
- Getting Started -- 5-minute quick start
- Architecture Principles -- System design
- Value Proposition -- What FraiseQL does and does not do
- Roadmap -- Prioritized next steps
- Changelog -- User-facing changes per version
- SLA/SLO Targets -- Availability and latency objectives
- Operational Runbooks -- Incident response procedures
- Security Checklist -- Production hardening
- Migration from v1 -- Upgrade path
- 4,773+ tests (unit, integration, E2E, property-based, fuzz)
- Zero unsafe code (forbidden at compile time)
- Clippy pedantic as deny with justified suppressions
- Load testing infrastructure (k6)
- 12 operational runbooks
See CONTRIBUTING.md for guidelines.
Dual-licensed under MIT or Apache 2.0. See LICENSE.