| Crates.io | seaography |
| lib.rs | seaography |
| version | 2.0.0-rc.8 |
| created_at | 2022-09-11 14:52:03.490898+00 |
| updated_at | 2026-01-11 22:58:41.604997+00 |
| description | 🧠A GraphQL framework for SeaORM |
| homepage | https://www.sea-ql.org/Seaography |
| repository | https://github.com/SeaQL/seaography |
| max_upload_size | |
| id | 663089 |
| size | 6,317,106 |
Seaography is a powerful and extensible GraphQL framework for Rust that bridges SeaORM and async-graphql, turning your database schema into a fully-typed GraphQL API with minimal effort. By leveraging async-graphql's dynamic schema engine, Seaography avoids the heavy code generation of static approaches, resulting in faster compile times. The generated schema stays in sync with your SeaORM entities, while still giving you full control to extend and customize it.
With Seaography you can focus on application logic instead of boilerplate. It enables you to:
Seaography is built on top of SeaORM, so it supports:
It's easy to integrate Seaography with any web framework, and we ship with the following examples out-of-the-box:
| Seaography | SeaORM |
|---|---|
| 2.0 | 2.0 |
| 1.1 | 1.1 |
Seaography is also completely extensible. It offers:
cargo install sea-orm-cli@^2.0.0-rc # used to generate entities
cargo install seaography-cli@^2.0.0-rc
Setup the sakila sample database.
Then regenerate example project like below, or simply do cargo run.
cd examples/mysql
sea-orm-cli generate entity -o src/entities -u mysql://user:pw@127.0.0.1/sakila --seaography
seaography-cli -o ./ -e src/entities -u mysql://user:pw@127.0.0.1/sakila seaography-mysql-example
cargo run
Setup the sakila sample database.
Then regenerate example project like below, or simply do cargo run.
cd examples/postgres
sea-orm-cli generate entity -o src/entities -u postgres://user:pw@localhost/sakila --seaography
seaography-cli -o ./ -e src/entities -u postgres://user:pw@localhost/sakila seaography-postgres-example
cargo run
sakila.db is shipped with this repository. You don't have to setup anything, simply do cargo run.
cd examples/sqlite
sea-orm-cli generate entity -o src/entities -u sqlite://sakila.db --seaography
seaography-cli -o ./ -e src/entities -u sqlite://sakila.db seaography-sqlite-example
cargo run
Go to http://localhost:8000/ and try out the following queries:
{
film(pagination: { page: { limit: 10, page: 0 } }, orderBy: { title: ASC }) {
nodes {
title
description
releaseYear
actor {
nodes {
firstName
lastName
}
}
}
}
}
{
store(filters: { storeId: { eq: 1 } }) {
nodes {
storeId
address {
address
address2
}
staff {
firstName
lastName
}
}
}
}
{
customer(
filters: { active: { eq: 0 } }
pagination: { page: { page: 2, limit: 3 } }
) {
nodes {
customerId
lastName
email
}
paginationInfo {
pages
current
}
}
}
{
customer(
filters: { active: { eq: 0 } }
pagination: { cursor: { limit: 3, cursor: "Int[3]:271" } }
) {
nodes {
customerId
lastName
email
}
pageInfo {
hasPreviousPage
hasNextPage
endCursor
}
}
}
Find all inactive customers, include their address, and their payments with amount greater than 7 ordered by amount the second result
{
customer(
filters: { active: { eq: 0 } }
pagination: { cursor: { limit: 3, cursor: "Int[3]:271" } }
) {
nodes {
customerId
lastName
email
address {
address
}
payment(
filters: { amount: { gt: "7" } }
orderBy: { amount: ASC }
pagination: { page: { limit: 1, page: 1 } }
) {
nodes {
paymentId
amount
}
paginationInfo {
pages
current
}
pageInfo {
hasPreviousPage
hasNextPage
}
}
}
pageInfo {
hasPreviousPage
hasNextPage
endCursor
}
}
}
{
film(
filters: { rating: { eq: NC17 } }
pagination: { page: { page: 1, limit: 5 } }
) {
nodes {
filmId
title
rating
}
}
}
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
We invite you to participate, contribute and together help build Rust's future.
A friend of Ferris, Terres the hermit crab is the official mascot of SeaORM. His hobby is collecting shells.