Skip to main content

build fast, flexible, secure backends in minutes

Exograph LogoExograph Logo

Exograph's Rust runtime automatically executes secure queries for your Postgres database and comes with an efficient Deno-powered runtime for custom logic

Data Models in Seconds

With Exograph, storing data is as simple as defining a type. Exograph automatically generates the appropriate database schema and efficient SQL queries.

@postgres
module EcommerceDatabase {
@access(true)
type Product {
@pk id: Int = autoIncrement()
name: String
description: String
price: Float
published: Boolean
department: Department
}

@access(true)
type Department {
@pk id: Int = autoIncrement()
name: String
products: Set<Product>?
}
}

Fine-Grained Access Controls

Free yourself from the coarseness of role-based authorization. Exograph allows you to specify complex permission models with just a few lines of code.

context AuthContext {
@jwt role: String
}

@postgres
module EcommerceDatabase {
@access(
query=self.published || AuthContext.role=="admin",
mutation=AuthContext.role=="admin")
type Product {
// ...
published: Boolean
}

@access(
query=true,
mutation=AuthContext.role=="admin")
type Department {
// ...
published: Boolean
}
}

Connect to Custom Logic

Sometimes, you just need to write regular code to integrate with external APIs or define custom algorithms. Exograph makes this easy with built-in Deno execution layer. Simply write JavaScript or TypeScript functions and link them into your Exograph model.

@deno("announce.ts")
module ProductAnnouncement {
@access(AuthContext.role=="admin")
mutation announce(
productId: Int,
@inject exo: Exograph
): String
}
const productQuery = 
`query getProduct($id: Int) {
product(id: $id) {
name,
price
}
}`;

export function announce(productId: number, exo: Exograph): string {
const product = exo.executeQuery(productQuery, {id: productId});
const potentialBuyers = exo.executeQuery(... analytics GraphQL query);
sendEmail(
potentialBuyers,
"New Product", `A new product ${product.name} is available`
);
return "Announcement sent";
}

Awesome Developer Experience

Get started in minutes with "yolo" mode and iterate fast using "dev" mode. Use its support for schema creation, migration, deployment, and more throughout the application lifecycle.
Exograph is a fully statically typed language with good error messages. Its models are just text files, so they fit right into your existing Git workflow.

Performant

Exograph is written in Rust, which along with careful design, helps it provide high performance, fast startup time, and low memory usage. Suitable for serverless platforms (and, of course, traditional cloud deployment too).

  • Cold startup time on AWS Lambda < 200ms
  • Memory footprint < 64MB
  • Fast query execution

Deploy Anywhere

Deploy to the cloud of your choice. Exograph comes with direct support for AWS Lambda, Fly.io, and any platform with Docker support.

Docker LogoFly LogoFly LogoFly Logo