Skip to content

Schema Authoring SDKs

FraiseQL provides 11 official SDKs in three categories:

  • Schema authoring (Python, TypeScript, Go, Java, PHP, C#, Elixir, F#) — define types, queries, and mutations using native language constructs. The FraiseQL CLI compiles these to an optimized Rust-powered GraphQL API backed by SQL views.
  • Client + schema authoring (Ruby, Dart) — same schema authoring capabilities, plus production-ready HTTP clients for consuming FraiseQL APIs. Ruby includes OpenAI integration; Dart includes Gemini integration.
  • Authorization library (Rust) — define field-level scope requirements and RBAC rules. Use alongside another SDK for type/query/mutation authoring.

Transport annotations (rest_path/rest_method) let you expose operations as REST endpoints. All 11 SDKs support REST annotations as of v2.1.0. gRPC endpoints are auto-generated when [grpc] is enabled — no per-operation annotation needed. See gRPC Transport.

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 in the AuthoringIR format, which the FraiseQL Rust runtime serves as a GraphQL API — with SQL views (v_*) handling reads and PostgreSQL functions (fn_*) handling mutations. If you’re building a custom code generator, see the AuthoringIR Format Reference for the exact JSON shape.

Your schema (Python/TS/Go/Java/PHP)
↓ fraiseql compile
schema.json (IR)
↓ fraiseql run
FraiseQL Rust server
PostgreSQL

Last verified: 2026-03-10 against v2.1.0

LanguageType SystemPackage ManagerStatus
PythonType hints + decoratorsPyPI / uvAlpha
TypeScriptNative types + decoratorsnpm / yarn / pnpmAlpha
GoStruct tags + buildersGo modules 1.22+Beta
JavaAnnotations + buildersMaven, GradleStable
RustAuthorization library (RBAC)CargoStable
PHPAttributes (PHP 8.2+)ComposerBeta
C#Attributes (.NET 8+)NuGetUnreleased
ElixirCompile-time macros (Elixir 1.14+)HexUnreleased
F#Computation expressions (.NET 8+)NuGetUnreleased
RubyType mixin + HTTP clientRubyGemsAlpha
DartAnnotations + HTTP clientpub.devAlpha

Status definitions:

  • Stable — Tested, versioned, published to package registry. API is stable.
  • Beta — Working implementation; API may have minor breaking changes before 1.0.
  • Alpha — Functional but incomplete; breaking changes likely.
  • Unreleased — Available on the main branch but not yet formally tagged in a release.
import fraiseql
from fraiseql.scalars import ID, Email, DateTime
@fraiseql.type
class User:
id: ID
email: Email
created_at: DateTime
@fraiseql.query
def users(limit: int = 20) -> list[User]:
return fraiseql.config(sql_source="v_user")
@fraiseql.mutation(sql_source="fn_create_user", operation="CREATE")
def create_user(input: CreateUserInput) -> User:
pass

Each SDK provides:

  • Type-safe schema definition — use your language’s native type system
  • Decorators/attributes/builders — metadata for GraphQL behavior (queries, mutations, authorization)
  • Schema compilation — generate schema.json for the FraiseQL Rust runtime
  • Role-based access control — restrict queries and mutations to callers with specific roles
  • Comparable feature set — all SDKs cover the core schema authoring primitives; capabilities may vary by language

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: field-level authorization metadata, scope validation, embedding security policy definitions in Rust applications.

Rust SDK docs

PHP SDK

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

PHP SDK docs

C# SDK

Best for: ASP.NET Core teams, .NET enterprise backends, Azure-hosted services.

C# SDK docs

Elixir SDK

Best for: Phoenix/Elixir backends, functional teams, high-concurrency services.

Elixir SDK docs

F# SDK

Best for: .NET functional programming teams, domain-driven design projects.

F# SDK docs

Ruby SDK

Best for: Rails teams, scripting, rapid prototyping. Includes HTTP client with retry and OpenAI integration.

Ruby SDK docs

Dart SDK

Best for: Flutter mobile/web apps, Dart CLI tools. Includes async HTTP client with Gemini integration.

Dart SDK docs

SDKs are compile-time tools. They do not:

  • Handle HTTP requests or execute GraphQL queries
  • Connect to databases or run at application startup
  • Add any runtime overhead — the server is always compiled Rust

Why this matters: The JSON schema is the contract between authoring and serving. You can compile on a developer machine and deploy only schema.json + the Rust binary. The attack surface is the Rust binary + PostgreSQL — SDK code never runs in production.