seaography examples
This commit is contained in:
parent
7f0290de3f
commit
8687407257
@ -25,7 +25,7 @@ cargo run
|
|||||||
## Install Seaography
|
## Install Seaography
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install seaography-cli@^1.0.0-rc.2
|
cargo install seaography-cli@^1.0.0-rc.3
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generate GraphQL project
|
## Generate GraphQL project
|
||||||
|
@ -5,19 +5,19 @@ version = "0.3.0"
|
|||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
poem = { version = "1.3.56" }
|
poem = { version = "3.0" }
|
||||||
async-graphql-poem = { version = "5.0.10" }
|
async-graphql-poem = { version = "7.0" }
|
||||||
async-graphql = { version = "5.0.10", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] }
|
async-graphql = { version = "7.0", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] }
|
||||||
async-trait = { version = "0.1.72" }
|
async-trait = { version = "0.1.72" }
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
sea-orm = { version = "0.12.0", features = ["sqlx-mysql", "runtime-async-std-native-tls", "seaography"] }
|
sea-orm = { path = "../../../", features = ["sqlx-mysql", "runtime-async-std-native-tls", "seaography"] }
|
||||||
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.29.1", features = ["macros", "rt-multi-thread"] }
|
||||||
tracing = { version = "0.1.37" }
|
tracing = { version = "0.1.37" }
|
||||||
tracing-subscriber = { version = "0.3.17" }
|
tracing-subscriber = { version = "0.3.17" }
|
||||||
lazy_static = { version = "1.4.0" }
|
lazy_static = { version = "1.4.0" }
|
||||||
|
|
||||||
[dependencies.seaography]
|
[dependencies.seaography]
|
||||||
version = "1.0.0-rc.2" # seaography version
|
version = "1.0.0-rc.3" # seaography version
|
||||||
features = ["with-decimal", "with-chrono"]
|
features = ["with-decimal", "with-chrono"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
@ -25,3 +25,8 @@ serde_json = { version = "1.0.103" }
|
|||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
members = []
|
members = []
|
||||||
|
|
||||||
|
# This allows us to develop using a local version of sea-orm
|
||||||
|
# remove this section in your own project
|
||||||
|
[patch.crates-io]
|
||||||
|
sea-orm = { path = "../../../" }
|
||||||
|
@ -11,7 +11,7 @@ pub fn schema(
|
|||||||
depth: Option<usize>,
|
depth: Option<usize>,
|
||||||
complexity: Option<usize>,
|
complexity: Option<usize>,
|
||||||
) -> Result<Schema, SchemaError> {
|
) -> Result<Schema, SchemaError> {
|
||||||
let mut builder = Builder::new(&CONTEXT);
|
let mut builder = Builder::new(&CONTEXT, database.clone());
|
||||||
seaography::register_entities!(builder, [baker, bakery, cake, cake_baker,]);
|
seaography::register_entities!(builder, [baker, bakery, cake, cake_baker,]);
|
||||||
let schema = builder.schema_builder();
|
let schema = builder.schema_builder();
|
||||||
let schema = if let Some(depth) = depth {
|
let schema = if let Some(depth) = depth {
|
||||||
|
@ -14,7 +14,7 @@ path = "src/lib.rs"
|
|||||||
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
async-std = { version = "1", features = ["attributes", "tokio1"] }
|
||||||
|
|
||||||
[dependencies.sea-orm]
|
[dependencies.sea-orm]
|
||||||
path = "../../.." # remove this line in your own project
|
path = "../../../" # remove this line in your own project
|
||||||
version = "1.0.0-rc.3" # sea-orm version
|
version = "1.0.0-rc.3" # sea-orm version
|
||||||
|
|
||||||
[dependencies.sea-orm-migration]
|
[dependencies.sea-orm-migration]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user