Skip to content

Schema Authoring SDKs

FraiseQL provides 6 schema authoring SDKs across different programming languages. Each SDK lets you define your GraphQL schema using native language constructs — type annotations, decorators, attributes, or derive macros — which the FraiseQL CLI compiles into an optimized Rust-powered GraphQL API backed by SQL views.

You write your schema in your preferred language using native type definitions and decorators/annotations/attributes. The FraiseQL CLI (fraiseql compile) compiles this to a schema.json intermediate representation, which the FraiseQL Rust runtime serves as a GraphQL API — with SQL views (v_*) handling reads and PostgreSQL functions (fn_*) handling mutations.

Your schema (Python/TS/Go/Java/Rust/PHP)
↓ fraiseql compile
schema.json (IR)
↓ fraiseql run
FraiseQL Rust server
PostgreSQL
LanguageType SystemPackage ManagerStatus
PythonType hints + decoratorsPyPI / uvStable
TypeScriptNative types + decoratorsnpm / yarn / pnpmStable
GoStruct tags + buildersGo modules 1.22+Stable
JavaAnnotationsMaven, GradleStable
RustDerive macrosCargoStable
PHPAttributes (PHP 8.1+)ComposerStable
import fraiseql
from fraiseql.scalars import ID, Email, DateTime
@fraiseql.type
class User:
id: ID
email: Email
created_at: DateTime
@fraiseql.query(sql_source="v_user")
def users(limit: int = 20) -> list[User]:
pass
@fraiseql.mutation
def create_user(info, input: CreateUserInput) -> User:
pass

Each SDK provides:

  • Type-safe schema definition — use your language’s native type system
  • Decorators/attributes/macros — metadata for GraphQL behavior (queries, mutations, authorization)
  • Input validation — validate inputs at compile time, before deployment
  • Schema compilation — generate schema.json for the FraiseQL Rust runtime
  • Full feature parity — all SDKs support the same core feature set
  • Testing utilities — test clients that run queries against a real database

Python SDK

Best for: data science, scripting, rapid iteration. Primary authoring language.

Python SDK docs

TypeScript SDK

Best for: Node.js backends, full-stack TypeScript teams, frontend-adjacent APIs.

TypeScript SDK docs

Go SDK

Best for: cloud-native microservices, high-throughput APIs, platform engineering.

Go SDK docs

Java SDK

Best for: enterprise backends, Spring Boot teams, JVM polyglot projects.

Java SDK docs

Rust SDK

Best for: maximum performance, systems programming, embedding in Rust applications.

Rust SDK docs

PHP SDK

Best for: Laravel/Symfony teams, web agencies, PHP-first backends.

PHP SDK docs