examples/seaography_example/README.md
| Seaography screenshot with Bakery schema |
| The Bakery schema |
export DATABASE_URL=mysql://sea:sea@localhost/bakery
Cd into migration folder and follow instructions there, but basically:
cargo run
cargo install seaography-cli@^1.1.3
rm -rf graphql # this entire folder is generated
sea-orm-cli generate entity --output-dir graphql/src/entities --seaography
seaography-cli graphql graphql/src/entities $DATABASE_URL sea-orm-seaography-example
cd graphql
cargo run
{
bakery(pagination: { page: { limit: 10, page: 0 } }, orderBy: { name: ASC }) {
nodes {
name
cake {
nodes {
name
price
baker {
nodes {
name
}
}
}
}
}
}
}
{
cake(filters: { glutenFree: { eq: 1 } }) {
nodes {
name
price
glutenFree
bakery {
name
}
}
}
}