diff --git a/examples/mysql/src/main.rs b/examples/mysql/src/main.rs index 91f1a75e..89f931c7 100644 --- a/examples/mysql/src/main.rs +++ b/examples/mysql/src/main.rs @@ -35,12 +35,9 @@ async fn main() { let database = Database::connect(&*DATABASE_URL) .await .expect("Fail to initialize database connection"); - let schema = seaography_mysql_example::query_root::schema( - database, - *DEPTH_LIMIT, - *COMPLEXITY_LIMIT, - ) - .unwrap(); + let schema = + seaography_mysql_example::query_root::schema(database, *DEPTH_LIMIT, *COMPLEXITY_LIMIT) + .unwrap(); let app = Route::new().at( &*ENDPOINT, get(graphql_playground).post(GraphQL::new(schema)), diff --git a/examples/mysql/tests/mutation_tests.rs b/examples/mysql/tests/mutation_tests.rs index 70e0bc00..44a1948d 100644 --- a/examples/mysql/tests/mutation_tests.rs +++ b/examples/mysql/tests/mutation_tests.rs @@ -2,20 +2,18 @@ use async_graphql::{dynamic::*, Response}; use sea_orm::Database; async fn main() { - test_simple_insert_one().await; - test_complex_insert_one().await; - test_create_batch_mutation().await; - test_update_mutation().await; - test_delete_mutation().await; + test_simple_insert_one().await; + test_complex_insert_one().await; + test_create_batch_mutation().await; + test_update_mutation().await; + test_delete_mutation().await; } pub async fn get_schema() -> Schema { let database = Database::connect("mysql://sea:sea@127.0.0.1/sakila") .await .unwrap(); - let schema = - seaography_mysql_example::query_root::schema(database, None, None) - .unwrap(); + let schema = seaography_mysql_example::query_root::schema(database, None, None).unwrap(); schema } @@ -587,7 +585,7 @@ async fn test_delete_mutation() { "#, ) .await, - r#" + r#" { "filmTextDelete": 2 } diff --git a/examples/mysql/tests/query_tests.rs b/examples/mysql/tests/query_tests.rs index 9f3b8642..97ca5a8c 100644 --- a/examples/mysql/tests/query_tests.rs +++ b/examples/mysql/tests/query_tests.rs @@ -5,8 +5,7 @@ pub async fn get_schema() -> Schema { let database = Database::connect("mysql://sea:sea@127.0.0.1/sakila") .await .unwrap(); - let schema = - seaography_mysql_example::query_root::schema(database, None, None).unwrap(); + let schema = seaography_mysql_example::query_root::schema(database, None, None).unwrap(); schema } diff --git a/examples/postgres/src/lib.rs b/examples/postgres/src/lib.rs index f66ddd9c..a292add5 100644 --- a/examples/postgres/src/lib.rs +++ b/examples/postgres/src/lib.rs @@ -1,3 +1,2 @@ pub mod entities; pub mod query_root; - diff --git a/examples/postgres/src/main.rs b/examples/postgres/src/main.rs index f0bcedcc..afdc96a8 100644 --- a/examples/postgres/src/main.rs +++ b/examples/postgres/src/main.rs @@ -35,12 +35,9 @@ async fn main() { let database = Database::connect(&*DATABASE_URL) .await .expect("Fail to initialize database connection"); - let schema = seaography_postgres_example::query_root::schema( - database, - *DEPTH_LIMIT, - *COMPLEXITY_LIMIT, - ) - .unwrap(); + let schema = + seaography_postgres_example::query_root::schema(database, *DEPTH_LIMIT, *COMPLEXITY_LIMIT) + .unwrap(); let app = Route::new().at( &*ENDPOINT, get(graphql_playground).post(GraphQL::new(schema)), diff --git a/examples/postgres/tests/mutation_tests.rs b/examples/postgres/tests/mutation_tests.rs index 5910af20..1fa66e91 100644 --- a/examples/postgres/tests/mutation_tests.rs +++ b/examples/postgres/tests/mutation_tests.rs @@ -3,20 +3,18 @@ use sea_orm::Database; #[tokio::test] async fn main() { - test_simple_insert_one().await; - test_complex_insert_one().await; - test_create_batch_mutation().await; - test_update_mutation().await; - test_delete_mutation().await; + test_simple_insert_one().await; + test_complex_insert_one().await; + test_create_batch_mutation().await; + test_update_mutation().await; + test_delete_mutation().await; } pub async fn get_schema() -> Schema { let database = Database::connect("postgres://sea:sea@127.0.0.1/sakila") .await .unwrap(); - let schema = - seaography_postgres_example::query_root::schema(database, None, None) - .unwrap(); + let schema = seaography_postgres_example::query_root::schema(database, None, None).unwrap(); schema } @@ -599,7 +597,7 @@ async fn test_delete_mutation() { "#, ) .await, - r#" + r#" { "languageDelete": 2 } @@ -632,4 +630,4 @@ async fn test_delete_mutation() { } "#, ); -} \ No newline at end of file +} diff --git a/examples/postgres/tests/query_tests.rs b/examples/postgres/tests/query_tests.rs index c99e3aaf..7c3d340d 100644 --- a/examples/postgres/tests/query_tests.rs +++ b/examples/postgres/tests/query_tests.rs @@ -5,9 +5,7 @@ pub async fn get_schema() -> Schema { let database = Database::connect("postgres://sea:sea@127.0.0.1/sakila") .await .unwrap(); - let schema = - seaography_postgres_example::query_root::schema(database, None, None) - .unwrap(); + let schema = seaography_postgres_example::query_root::schema(database, None, None).unwrap(); schema } @@ -918,4 +916,4 @@ async fn test_boolean_field() { } "#, ) -} \ No newline at end of file +} diff --git a/examples/sqlite/tests/mutation_tests.rs b/examples/sqlite/tests/mutation_tests.rs index 8605cc43..c3f9dec5 100644 --- a/examples/sqlite/tests/mutation_tests.rs +++ b/examples/sqlite/tests/mutation_tests.rs @@ -3,11 +3,11 @@ use sea_orm::Database; #[tokio::test] async fn main() { - test_simple_insert_one().await; - test_complex_insert_one().await; - test_create_batch_mutation().await; - test_update_mutation().await; - test_delete_mutation().await; + test_simple_insert_one().await; + test_complex_insert_one().await; + test_create_batch_mutation().await; + test_update_mutation().await; + test_delete_mutation().await; } pub async fn get_schema() -> Schema { @@ -501,8 +501,9 @@ async fn test_update_mutation() { async fn test_delete_mutation() { let schema = get_schema().await; - schema.execute( - r#" + schema + .execute( + r#" mutation { filmTextCreateBatch( data: [ @@ -514,9 +515,9 @@ async fn test_delete_mutation() { filmId } } - "# - ) - .await; + "#, + ) + .await; assert_eq( schema @@ -565,7 +566,7 @@ async fn test_delete_mutation() { "#, ) .await, - r#" + r#" { "filmTextDelete": 2 } diff --git a/src/lib.rs b/src/lib.rs index c3c1a07f..049c89ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,9 +34,9 @@ //! * Mutations (create, update, delete) //! //! (Right now there is no mutation, but it's on our plan!) -//! +//! //! ## SeaORM Version Compatibility -//! +//! //! | Seaography | SeaORM | //! |----------------------------------------------------------|-------------------------------------------------------| //! | [0.12](https://crates.io/crates/seaography/0.12.0) | [0.12](https://crates.io/crates/sea-orm/0.12.14) |