brylix 0.2.1

GraphQL framework for AWS Lambda with SeaORM and multi-tenant support
Documentation

Brylix

A Rust framework for building GraphQL APIs on AWS Lambda with SeaORM and multi-tenant support.

Features

  • GraphQL API - Built on async-graphql with playground support
  • AWS Lambda - Optimized for serverless deployment with cargo-lambda
  • SeaORM - Type-safe database operations with MySQL/PostgreSQL support
  • Multi-tenant - Pool-per-droplet architecture for SaaS applications
  • JWT Authentication - Secure token-based authentication
  • Validation - Built-in input validation utilities

Installation

[dependencies]
brylix = "0.1"

Quick Start

use brylix::prelude::*;
use async_graphql::{EmptySubscription, Schema};

#[tokio::main]
async fn main() -> Result<(), brylix::Error> {
    Brylix::builder()
        .config_from_env()
        .with_jwt_auth()
        .with_migrations::<migration::Migrator>()
        .build_schema(|| {
            Schema::build(
                graphql::Query,
                graphql::Mutation,
                EmptySubscription,
            )
            .finish()
        })
        .build()?
        .run()
        .await
}

Feature Flags

Feature Description Default
mysql MySQL/MariaDB support via sqlx Yes
postgres PostgreSQL support via sqlx No
playground GraphQL Playground IDE Yes
multi-tenant Multi-tenant support No
full All features enabled No
# PostgreSQL instead of MySQL
brylix = { version = "0.1", default-features = false, features = ["postgres", "playground"] }

# Multi-tenant support
brylix = { version = "0.1", features = ["multi-tenant"] }

Environment Variables

DATABASE_URL=mysql://user:password@host/database
JWT_SECRET=your-secret-key
JWT_EXP_DAYS=7

Documentation

Full documentation is available at docs.rs/brylix.

License

Licensed under either of Apache License 2.0 or MIT License at your option.