Skip to content

Commit

Permalink
seaography examples
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed May 2, 2024
1 parent 7f0290d commit 8687407
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/seaography_example/README.md
Expand Up @@ -25,7 +25,7 @@ cargo run
## Install Seaography

```sh
cargo install seaography-cli@^1.0.0-rc.2
cargo install seaography-cli@^1.0.0-rc.3
```

## Generate GraphQL project
Expand Down
17 changes: 11 additions & 6 deletions examples/seaography_example/graphql/Cargo.toml
Expand Up @@ -5,23 +5,28 @@ version = "0.3.0"
publish = false

[dependencies]
poem = { version = "1.3.56" }
async-graphql-poem = { version = "5.0.10" }
async-graphql = { version = "5.0.10", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] }
poem = { version = "3.0" }
async-graphql-poem = { version = "7.0" }
async-graphql = { version = "7.0", features = ["decimal", "chrono", "dataloader", "dynamic-schema"] }
async-trait = { version = "0.1.72" }
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"] }
tracing = { version = "0.1.37" }
tracing-subscriber = { version = "0.3.17" }
lazy_static = { version = "1.4.0" }

[dependencies.seaography]
version = "1.0.0-rc.2" # seaography version
version = "1.0.0-rc.3" # seaography version
features = ["with-decimal", "with-chrono"]

[dev-dependencies]
serde_json = { version = "1.0.103" }

[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 = "../../../" }
2 changes: 1 addition & 1 deletion examples/seaography_example/graphql/src/query_root.rs
Expand Up @@ -11,7 +11,7 @@ pub fn schema(
depth: Option<usize>,
complexity: Option<usize>,
) -> 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,]);
let schema = builder.schema_builder();
let schema = if let Some(depth) = depth {
Expand Down
2 changes: 1 addition & 1 deletion examples/seaography_example/migration/Cargo.toml
Expand Up @@ -14,7 +14,7 @@ path = "src/lib.rs"
async-std = { version = "1", features = ["attributes", "tokio1"] }

[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

[dependencies.sea-orm-migration]
Expand Down

0 comments on commit 8687407

Please sign in to comment.