Python SDK
Best for: data science, scripting, rapid iteration. Primary authoring language.
FraiseQL provides 11 official SDKs in three categories:
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 ↓ PostgreSQLLast verified: 2026-03-10 against v2.1.0
| Language | Type System | Package Manager | Status |
|---|---|---|---|
| Python | Type hints + decorators | PyPI / uv | Alpha |
| TypeScript | Native types + decorators | npm / yarn / pnpm | Alpha |
| Go | Struct tags + builders | Go modules 1.22+ | Beta |
| Java | Annotations + builders | Maven, Gradle | Stable |
| Rust | Authorization library (RBAC) | Cargo | Stable |
| PHP | Attributes (PHP 8.2+) | Composer | Beta |
| C# | Attributes (.NET 8+) | NuGet | Unreleased |
| Elixir | Compile-time macros (Elixir 1.14+) | Hex | Unreleased |
| F# | Computation expressions (.NET 8+) | NuGet | Unreleased |
| Ruby | Type mixin + HTTP client | RubyGems | Alpha |
| Dart | Annotations + HTTP client | pub.dev | Alpha |
Status definitions:
main branch but not yet formally tagged in a release.import fraiseqlfrom fraiseql.scalars import ID, Email, DateTime
@fraiseql.typeclass User: id: ID email: Email created_at: DateTime
@fraiseql.querydef 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: passimport { Type, registerTypeFields, registerQuery, registerMutation } from 'fraiseql';
@Type()class User {}
registerTypeFields('User', [ { name: 'id', type: 'ID', nullable: false }, { name: 'email', type: 'Email', nullable: false }, { name: 'createdAt', type: 'DateTime', nullable: false },]);
registerQuery('users', 'User', true, false, [ { name: 'limit', type: 'Int', nullable: false, default: 20 },], 'Get all users', { sqlSource: 'v_user' });
registerMutation('createUser', 'User', false, false, [ { name: 'input', type: 'CreateUserInput', nullable: false },], 'Create a new user', { sqlSource: 'fn_create_user', operation: 'CREATE' });import "github.com/fraiseql/fraiseql-go/fraiseql"
type User struct { ID fraiseql.ID `fraiseql:"id,type=ID"` Email fraiseql.Email `fraiseql:"email,type=Email"` CreatedAt fraiseql.DateTime `fraiseql:"created_at,type=DateTime"`}
func init() { fraiseql.RegisterTypes(User{})
fraiseql.NewQuery("users"). SqlSource("v_user"). ReturnType(User{}). ReturnsArray(true). Arg("limit", "Int", 20). Register()
fraiseql.NewMutation("create_user"). SqlSource("fn_create_user"). ReturnType(User{}). Arg("input", "CreateUserInput", nil). Operation("insert"). Register()}import com.fraiseql.core.*;
@GraphQLTypepublic class User { @GraphQLField(type = "ID", nullable = false) public String id; @GraphQLField(type = "Email", nullable = false) public String email; @GraphQLField(type = "DateTime", nullable = false) public String createdAt;}
// Queries and mutations use a fluent builder — register in application startupFraiseQL.registerTypes(User.class);
FraiseQL.query("users") .returnType(User.class) .returnsArray(true) .sqlSource("v_user") .arg("limit", "Int", 20) .register();
FraiseQL.mutation("createUser") .returnType(User.class) .sqlSource("fn_create_user") .arg("input", "CreateUserInput") .register();use fraiseql_rust::{SchemaRegistry, Field};
// fraiseql-rust is an authorization library, not a schema authoring DSL.// Use it to define field-level scope requirements and RBAC rules alongside// another SDK (Python, Go, etc.) for type/query/mutation authoring.let mut registry = SchemaRegistry::new();registry.register_type("User", vec![ Field::new("id", "ID").with_nullable(false), Field::new("email", "Email") .with_nullable(false) .with_requires_scope(Some("read:user.email".to_string())), Field::new("created_at", "DateTime").with_nullable(false),]);use FraiseQL\Attributes\{GraphQLType, GraphQLField};use FraiseQL\Scalars;use FraiseQL\StaticAPI;
#[GraphQLType]class User { #[GraphQLField(type: Scalars::ID, nullable: false)] public string $id; #[GraphQLField(type: Scalars::EMAIL, nullable: false)] public string $email; #[GraphQLField(type: Scalars::DATE_TIME, nullable: false)] public string $createdAt;}
// Queries and mutations use a fluent builder — register in application startupStaticAPI::register(User::class);
StaticAPI::query('users') ->returnType('User') ->returnsList(true) ->sqlSource('v_user') ->argument('limit', 'Int', nullable: true, default: 20) ->register();
StaticAPI::mutation('createUser') ->returnType('User') ->sqlSource('fn_create_user') ->argument('input', 'CreateUserInput', nullable: false) ->register();Each SDK provides:
schema.json for the FraiseQL Rust runtimePython SDK
Best for: data science, scripting, rapid iteration. Primary authoring language.
TypeScript SDK
Best for: Node.js backends, full-stack TypeScript teams, frontend-adjacent APIs.
Go SDK
Best for: cloud-native microservices, high-throughput APIs, platform engineering.
Java SDK
Best for: enterprise backends, Spring Boot teams, JVM polyglot projects.
Rust SDK
Best for: field-level authorization metadata, scope validation, embedding security policy definitions in Rust applications.
PHP SDK
Best for: Laravel/Symfony teams, web agencies, PHP-first backends.
C# SDK
Best for: ASP.NET Core teams, .NET enterprise backends, Azure-hosted services.
Elixir SDK
Best for: Phoenix/Elixir backends, functional teams, high-concurrency services.
F# SDK
Best for: .NET functional programming teams, domain-driven design projects.
Ruby SDK
Best for: Rails teams, scripting, rapid prototyping. Includes HTTP client with retry and OpenAI integration.
Dart SDK
Best for: Flutter mobile/web apps, Dart CLI tools. Includes async HTTP client with Gemini integration.
SDKs are compile-time tools. They do not:
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.