Gurafi
Rust crates for building GraphQL servers.
gurafi is a type-safe, code-first GraphQL stack for Rust. Rust types describe the schema,
#[derive] macros provide the wiring, and the resulting gql::Schema is a normal GraphQL
schema that can be executed directly or served over HTTP.
The documentation follows a progressive learning path: start with a schema and a query, then add models, fields, arguments and context. Each concept is expressed with Rust types, builder methods and derives rather than with generated resolver types.
Start here
- Getting started — install the crates, build a schema, run a query
- Objects — turn application data into GraphQL object types
- Fields — resolvers, lists, nullability, exposure and field options
- Using args — typed arguments from Rust structs
- Using context — request state shared by every resolver
Guide
- Enums
- Scalars
- Input objects
- Queries, mutations and subscriptions
- Interfaces
- Unions
- Schema builder
- Using plugins
- File layout
- Circular references
- Patterns
- Nullability
- Type inference
- Using GraphiQL
- Printing schemas
- Generating client types
- Troubleshooting
- Writing plugins
- Integrations and non-goals
Plugins and extensions
- Add GraphQL and schema composition
- Complexity
- Dataloaders and request cache
- Directives
- Typed errors
- Mocks
- Relay
- Scope auth
- Simple objects
- Tracing and observability
- Validation
Server
- Serving over HTTP with
suku— HTTP, SSE, WebSocket subscriptions, multipart uploads and GraphiQL - Error formatting and masking
Reference
- Architecture — how
gql,gurafi,gurafi-relayandsukufit together - Schema evolution — compatibility diffing, SDL snapshots, composition
Crates
The crates are deliberately independent: gql knows nothing about HTTP or Rust models, gurafi
builds only on the public gql API, and suku only understands gql::Schema.
