seaography 0.1.0

🧭 A GraphQL framework and code generator for SeaORM
Documentation

crate docs build status

Seaography

Seaography is a GraphQL framework for building GraphQL resolvers using SeaORM entities. It ships with a CLI tool that can generate ready-to-compile Rust GraphQL servers from existing MySQL, Postgres and SQLite databases.

Quick start - ready to serve in 3 minutes!

Install

cargo install seaography-cli

MySQL

Setup the sakila sample database.

cd examples/mysql
seaography-cli mysql://user:pw@localhost/sakila seaography-example-mysql .
cargo run

Go to http://localhost:8000/ and try out the following query:

{
  film(pagination: { limit: 10, page: 0 }, orderBy: { title: ASC }) {
    data {
      title
      description
      releaseYear
      filmActor {
        actor {
          firstName
          lastName
        }
      }
    }
  }
}

Postgres

Setup the sakila sample database.

cd examples/postgres
seaography-cli postgres://user:pw@localhost/sakila seaography-example-postgres .
cargo run

SQLite

cd examples/sqlite
seaography-cli sqlite://chinook.db seaography-example-sqlite .
cargo run

Go to http://localhost:8000/ and try out the following query:

{
  albums(pagination: { limit: 10, page: 0 }) {
    data {
      title
      artists {
        name
      }
    }
  }
}

Contribution

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.

Seaography is a community driven project. We welcome you to participate, contribute and together build for Rust's future.