Welcome to the exciting world of Seaography! This powerful framework enables developers to effortlessly create GraphQL resolvers using SeaORM entities. With a few simple commands, you can transform your existing MySQL, Postgres, and SQLite databases into ready-to-compile Rust GraphQL servers. Let’s dive into the step-by-step guide on setting this up!
Benefits of Seaography
- Quick and easy to get started
- Generates readable code that is easy to understand
- Features an extensible project structure
- Built on well-known async libraries: async-graphql and SeaORM
Features at a Glance
- Relational queries (1-to-1, 1-to-N)
- Pagination for queries and relations (1-N)
- Filtering with operators (e.g., gt, lt, eq)
- Order by any column
- Guard fields, queries, or relations
- Rename fields
- Mutations (create, update, delete) — on the roadmap!
SeaORM Version Compatibility
| Seaography | SeaORM |
|---|---|
| 1.1-rc | 1.1-rc |
| 1.0 | 1.0 |
| 0.12 | 0.12 |
| 0.3 | 0.10 |
Quick Start: Set Up in Just 3 Minutes!
Follow these simple commands to get your Seaography setup rolling:
cargo install sea-orm-cli@^1.0.0 # Used to generate entities
cargo install seaography-cli@^1.0.0
Database Setup
Now let’s set up the sample database for different setups:
For MySQL:
sh
cd examples/mysql
sea-orm-cli generate entity -o src/entities -u mysql:user:pw@127.0.0.1/sakila --seaography
seaography-cli . src/entities mysql:user:pw@127.0.0.1/sakila seaography-mysql-example
cargo run
Visit http://localhost:8000 to try out the following queries:
Example Queries:
graphql
film(pagination: { page: 0, limit: 10 }, orderBy: { title: ASC }) {
nodes {
title
description
releaseYear
actor {
nodes {
firstName
lastName
}
}
}
}
For Postgres:
sh
cd examples/postgres
sea-orm-cli generate entity -o src/entities -u postgres:user:pw@localhost/sakila --seaography
seaography-cli . src/entities postgres:user:pw@localhost/sakila seaography-postgres-example
cargo run
For SQLite:
sh
cd examples/sqlite
sea-orm-cli generate entity -o src/entities -u sqlite:sakila.db --seaography
seaography-cli . src/entities sqlite:sakila.db seaography-sqlite-example
cargo run
Troubleshooting
If you encounter any issues while setting up or running Seaography, here are a few tips to help you resolve them:
- Make sure that the database server (MySQL/Postgres/SQLite) is running and accessible.
- Check if the credentials and database names used in the command are correct.
- Ensure you have all dependencies installed on your system; you can review the installation logs for missing packages.
- If the CLI commands don’t execute properly, try running them with the verbose flag for more debugging information.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

