-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
38 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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:[email protected]/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 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,7 @@ pub async fn get_schema() -> Schema { | |
let database = Database::connect("mysql://sea:[email protected]/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 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
pub mod entities; | ||
pub mod query_root; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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:[email protected]/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() { | |
} | ||
"#, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,7 @@ pub async fn get_schema() -> Schema { | |
let database = Database::connect("postgres://sea:[email protected]/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() { | |
} | ||
"#, | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters