| title | GraphQL ORM workspace |
|---|---|
| kind | reference |
| status | active |
| owner | workspace-maintainers |
| last_reviewed | 2026-08-12 |
| review_by | 2027-02-01 |
| supersedes |
graphql-orm turns Rust entity definitions into an async-graphql API and
typed repository helpers. It generates filters, ordering, keyset pagination,
relations, schema metadata, and explicit migration plans while leaving the
application in control of its server, authentication, authorization, and
deployment.
Start with the five-minute SQLite GraphQL quickstart. It is a runnable Axum service with a managed SQLite schema, seed data, a generated GraphQL query, and a smoke test.
Use this workspace when you want to:
- build a Rust +
async-graphqlservice on SQLite or PostgreSQL, with explicit application-controlled schema ownership; - expose a safe generated GraphQL read layer, or deliberately enabled generated DML, over an existing SQL Server schema; or
- compose independent storage, backup, AI, operation-catalog, and Federation router packages without making them dependencies of the core ORM.
It is not a hosted GraphQL service, an authentication provider, or a database
administration system. SQL Server compatibility constructors remain
physically read-only; generated DML requires the explicit ExternalWritable
connection and schema policy.
Schema construction never applies migrations; applications choose and execute
schema changes explicitly.
Typed transactions support bounded set-based deletes on opted-in mutable entities.
Packages are distributed through Git. Use the workspace package inventory to find package manifests and the workspace release manifest for the released versions and source revision. Replace the placeholder below with the reviewed full commit SHA.
[dependencies]
graphql-orm = { git = "https://github.com/Dastari/graphql-orm.git", rev = "<reviewed-full-40-character-commit-sha>", default-features = false, features = ["sqlite"] }If your application depends directly on agql-auth, use the same Git URL and
tag as the selected workspace revision's Cargo.toml and verify
that the lockfile resolves one Auth source.
Choose exactly the backend support needed by each service. Cargo can unify
features in a shared dependency graph; when more than one backend is enabled,
declare the backend explicitly on each entity and schema_roots! block.
The quickstart pins its own repository
snapshot.
| Backend | Reads | Generated writes | Managed migrations | Intended schema policy |
|---|---|---|---|---|
SQLite (sqlite) |
Yes | Yes | Yes | Managed |
PostgreSQL (postgres) |
Yes | Yes | Yes | Managed or externally owned |
Microsoft SQL Server (mssql) |
Yes | Yes, when explicitly enabled | No | ExternalReadOnly or ExternalWritable |
Backend features compile database support. SchemaPolicy separately decides
whether the application owns the schema: Managed, ValidateOnly, PlanOnly,
ExternalWritable, or ExternalReadOnly. Read the schema-management
reference before connecting
to an existing database.
| Package | Use it for | Start here |
|---|---|---|
graphql-orm |
Generated GraphQL, repositories, migrations, and database runtime | quickstart |
graphql-orm-macros |
The derive macros re-exported by graphql-orm |
package README |
graphql-orm-operation-catalog |
Stable generated-operation metadata and fingerprints | package README |
graphql-orm-storage |
Provider-neutral object storage contracts | package docs |
graphql-orm-backup |
Backup, verification, and restore orchestration | package docs |
graphql-orm-ai-tool-profiles |
Least-privilege AI tool declarations | package README |
graphql-orm-ai |
Project-neutral AI runtime and durable state | package docs |
graphql-orm-router-protocol |
Versioned project-neutral subgraph/router declarations | package README |
graphql-orm-router |
Federated GraphQL router runtime | package README |
PostgreSQL journal users can opt into canonical single-column keys shared by the recorder and full snapshots. The cutover starts a fresh incremental chain. See the migration procedure.
The packages remain independently consumable. Adding one does not enable the others as ORM features.
SQLite and PostgreSQL support managed schemas and generated writes. SQL Server
supports externally managed reads and deliberate ExternalWritable DML, but
not managed migrations or backups. The generated API supplies query limits and
policy hooks, but it does not make an application public-service ready by
itself: install authentication, authorization, disclosure policy, rate limits,
transport security, and operational controls in the host application.
The quickstart intentionally sets auth: "none" for a local learning server.
Do not deploy that configuration. See authentication and
authorization,
operation assurance, and the
GraphQL workflow.
SQL Server hosts can opt in to native integer parameter widths per pool.
String filters bind as NVARCHAR because the 0.215.0 ASCII VARCHAR conversion
could match different rows under legacy SQL_ collations. In the fixture,
Windows CP1252 and UTF-8 VARCHAR indexes sought at 2 logical reads with
NVARCHAR and 10 with conversion checks. The SQL_ index scanned at 31 reads
with NVARCHAR and sought at 2 with the 0.215.0 conversion. Action needed
if you depended on that seek. Move to a Windows column collation or index a
persisted computed Unicode column for the affected comparison. Single-row
and bulk updates validate unsigned inputs before selecting targets.
SQL Server parameter types
- Learn — begin with a working service.
- How-to guides — choose a backend, manage schemas, work with entities, or operate companion packages.
- Core ORM reference — runtime mechanics and configuration; use the macro and attribute reference for exact derive syntax.
- Reference index — all API and configuration material.
- Concepts — package boundaries, persistence, auth, assurance, storage, and backup design.
- Agent skills — install
graphql-orm-usageso a coding agent in your project chooses generated operations, hooks and relations over hand-written GraphQL. - Contributing and verification — workspace setup and maintainer checks.
The documentation index is the canonical navigation point.