Any Database
PostgreSQL, MySQL, SQLite, and SQL Server. Full multi-database support with database-specific optimizations.
FraiseQL is a database-first GraphQL framework. You write SQL views, FraiseQL maps them to GraphQL types, and every query resolves to a single SQL statement. No resolvers. No N+1. No magic.
FraiseQL serves three API transports from a single compiled schema: GraphQL, REST, and gRPC. You author the schema once in your preferred language, compile it, and run a single Rust binary that handles all three simultaneously.
Traditional approach:
FraiseQL:
fraiseql compile stepThe Python API is the primary schema authoring layer. For teams that prefer a TOML-first workflow, SpecQL is an optional companion tool that compiles TOML schema definitions to FraiseQL Python decorators, with 56 built-in semantic scalar types (Email, IBAN, Money, and more).
Traditional GraphQL frameworks require you to:
This leads to boilerplate code, runtime unpredictability, and hours spent debugging performance issues.
FraiseQL compiles the relationship between GraphQL types and SQL views at build time. At runtime, a GraphQL query becomes a single SQL statement — not a cascade of resolver calls.
| Traditional GraphQL | FraiseQL |
|---|---|
| Write resolver functions | Write SQL views |
| Handle N+1 with DataLoaders | N+1 eliminated by design |
| Tune performance at runtime | Performance compiled in |
| YAML / JSON configuration | TOML you can read |
| Debug resolver chains | Debug SQL — you own it |
Write tables and views in SQL for your database.
CREATE VIEW v_post ASSELECT p.id, jsonb_build_object( 'id', p.id::text, 'title', p.title, 'author', vu.data ) AS dataFROM tb_post pJOIN tb_user u ON u.pk_user = p.fk_userJOIN v_user vu ON vu.id = u.id;Define types in your preferred language.
@fraiseql.typeclass Post: id: ID title: str author: Userimport { Type } from 'fraiseql';
@Type()class Post { id: string; title: string; author: User;}type Post struct { ID string `fraiseql:"id"` Title string `fraiseql:"title"` Author User `fraiseql:"author"`}Configure with a single TOML file.
[project]name = "my-api"database_target = "postgresql"
[database]url = "${DATABASE_URL}"
[server]port = 8080Build and serve.
fraiseql compilefraiseql runYour GraphQL API is live. Every query resolves to the SQL view you wrote.
Any Database
PostgreSQL, MySQL, SQLite, and SQL Server. Full multi-database support with database-specific optimizations.
Any Language
Define schemas in Python, TypeScript, Go, Java, Rust, PHP, C#, Elixir, F#, Ruby, and Dart. All compile to the same output.
No N+1 by Design
SQL views pre-join relationships. FraiseQL never issues N+1 queries — it’s architecturally impossible.
Compile-Time Validation
Built-in validators catch errors at build time. Invalid schemas cannot be deployed.
You Own the SQL
You write the views. You see the query that runs. Full debuggability and control.
Rust Performance
Sub-millisecond query routing. The binary is a single compiled executable with no runtime dependencies.
FraiseQL supports four databases:
| Database | Status | Notes |
|---|---|---|
| PostgreSQL | ✅ Recommended | Best JSONB support, row-level security, full-text search |
| MySQL | ✅ Supported | JSON column support, MySQL 8.0+ |
| SQLite | ✅ Supported | Ideal for development and embedded use |
| SQL Server | ✅ Supported | FOR JSON PATH, SQL Server 2019+ |
| Oracle | ❌ Not supported | No plans to add support |
FraiseQL is ideal when you need:
FraiseQL isn’t the right tool for every use case. Consider alternatives if you need:
5-Minute Quickstart
Manual Setup
Full Tutorial
How It Works