From cb3360847366d2fd70a33eb5f9df60e90e8979da Mon Sep 17 00:00:00 2001 From: Koxiaet <38139193+Koxiaet@users.noreply.github.com> Date: Thu, 15 Oct 2020 20:47:45 +0100 Subject: [PATCH] Update dependencies --- Cargo.toml | 2 +- actix-web/error-extensions/Cargo.toml | 6 +++--- actix-web/starwars/Cargo.toml | 6 +++--- actix-web/subscription/Cargo.toml | 6 +++--- actix-web/token-from-header/Cargo.toml | 6 +++--- actix-web/upload/Cargo.toml | 6 +++--- federation/federation-accounts/Cargo.toml | 8 ++++---- federation/federation-products/Cargo.toml | 8 ++++---- federation/federation-reviews/Cargo.toml | 8 ++++---- models/books/Cargo.toml | 6 +++--- models/files/Cargo.toml | 4 ++-- models/files/src/lib.rs | 2 +- models/starwars/Cargo.toml | 2 +- rocket/starwars/Cargo.toml | 6 +++--- rocket/starwars/src/main.rs | 16 +++++----------- tide/dataloader/Cargo.toml | 4 ++-- tide/starwars/Cargo.toml | 4 ++-- tide/token-from-header/Cargo.toml | 4 ++-- tide/token-from-header/src/main.rs | 2 +- warp/starwars/Cargo.toml | 6 +++--- warp/subscription/Cargo.toml | 6 +++--- warp/token-from-header/Cargo.toml | 6 +++--- 22 files changed, 59 insertions(+), 65 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 288585d..28fb7f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,5 +22,5 @@ members = [ "tide/token-from-header", "tide/dataloader", - #"rocket/starwars", + "rocket/starwars", ] diff --git a/actix-web/error-extensions/Cargo.toml b/actix-web/error-extensions/Cargo.toml index 208c612..03ceab4 100644 --- a/actix-web/error-extensions/Cargo.toml +++ b/actix-web/error-extensions/Cargo.toml @@ -5,9 +5,9 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-actix-web = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-actix-web = { path = "../../../integrations/actix-web", version = "2.0.0" } actix-web = "3.0.0" actix-rt = "1.1.0" thiserror = "1.0" -serde_json = "1.0" \ No newline at end of file +serde_json = "1.0" diff --git a/actix-web/starwars/Cargo.toml b/actix-web/starwars/Cargo.toml index c77d6ec..bebb4c8 100644 --- a/actix-web/starwars/Cargo.toml +++ b/actix-web/starwars/Cargo.toml @@ -5,8 +5,8 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-actix-web = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-actix-web = { path = "../../../integrations/actix-web", version = "2.0.0" } actix-web = "3.0.0" actix-rt = "1.1.0" -starwars = { path = "../../models/starwars" } \ No newline at end of file +starwars = { path = "../../models/starwars" } diff --git a/actix-web/subscription/Cargo.toml b/actix-web/subscription/Cargo.toml index f9dcdf6..05abc81 100644 --- a/actix-web/subscription/Cargo.toml +++ b/actix-web/subscription/Cargo.toml @@ -5,9 +5,9 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-actix-web = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-actix-web = { path = "../../../integrations/actix-web", version = "2.0.0" } actix-web = "3.0.0" actix-rt = "1.1.0" actix-web-actors = "3.0.0" -books = { path = "../../models/books" } \ No newline at end of file +books = { path = "../../models/books" } diff --git a/actix-web/token-from-header/Cargo.toml b/actix-web/token-from-header/Cargo.toml index ff523c2..4d348da 100644 --- a/actix-web/token-from-header/Cargo.toml +++ b/actix-web/token-from-header/Cargo.toml @@ -5,12 +5,12 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-actix-web = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-actix-web = { path = "../../../integrations/actix-web", version = "2.0.0" } actix-web = "3.0.0" actix-rt = "1.1.0" futures = "0.3" actix-web-actors = "3.0.0" serde_json = "1.0" serde_derive = "1.0" -serde = "1.0" \ No newline at end of file +serde = "1.0" diff --git a/actix-web/upload/Cargo.toml b/actix-web/upload/Cargo.toml index e55ee8c..fba3442 100644 --- a/actix-web/upload/Cargo.toml +++ b/actix-web/upload/Cargo.toml @@ -5,8 +5,8 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-actix-web = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-actix-web = { path = "../../../integrations/actix-web", version = "2.0.0" } actix-web = "3.0.0" actix-rt = "1.1.0" -files = { path = "../../models/files" } \ No newline at end of file +files = { path = "../../models/files" } diff --git a/federation/federation-accounts/Cargo.toml b/federation/federation-accounts/Cargo.toml index 3a460ab..fa55399 100644 --- a/federation/federation-accounts/Cargo.toml +++ b/federation/federation-accounts/Cargo.toml @@ -5,7 +5,7 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } -warp = "0.2" \ No newline at end of file +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } +warp = "0.2" diff --git a/federation/federation-products/Cargo.toml b/federation/federation-products/Cargo.toml index 9340677..b2532d8 100644 --- a/federation/federation-products/Cargo.toml +++ b/federation/federation-products/Cargo.toml @@ -5,7 +5,7 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } -warp = "0.2" \ No newline at end of file +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } +warp = "0.2" diff --git a/federation/federation-reviews/Cargo.toml b/federation/federation-reviews/Cargo.toml index 758bbb4..663d93b 100644 --- a/federation/federation-reviews/Cargo.toml +++ b/federation/federation-reviews/Cargo.toml @@ -5,7 +5,7 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } -warp = "0.2" \ No newline at end of file +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } +warp = "0.2" diff --git a/models/books/Cargo.toml b/models/books/Cargo.toml index 97b0014..986a4eb 100644 --- a/models/books/Cargo.toml +++ b/models/books/Cargo.toml @@ -5,8 +5,8 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } slab = "0.4.2" -tokio = { version = "0.2", features = ["time", "stream"] } +tokio = { version = "0.3.0", features = ["time", "stream"] } futures = "0.3.0" -once_cell = "1.0" \ No newline at end of file +once_cell = "1.0" diff --git a/models/files/Cargo.toml b/models/files/Cargo.toml index 40d77e5..6570247 100644 --- a/models/files/Cargo.toml +++ b/models/files/Cargo.toml @@ -5,6 +5,6 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } slab = "0.4.2" -futures = "0.3.0" \ No newline at end of file +futures = "0.3.0" diff --git a/models/files/src/lib.rs b/models/files/src/lib.rs index d6815fb..cc65ae0 100644 --- a/models/files/src/lib.rs +++ b/models/files/src/lib.rs @@ -35,7 +35,7 @@ impl MutationRoot { let info = FileInfo { id: entry.key().into(), filename: upload.filename.clone(), - mimetype: upload.content_type.clone(), + mimetype: upload.content_type, }; entry.insert(info.clone()); info diff --git a/models/starwars/Cargo.toml b/models/starwars/Cargo.toml index 1da95a5..5640a98 100644 --- a/models/starwars/Cargo.toml +++ b/models/starwars/Cargo.toml @@ -5,5 +5,5 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } slab = "0.4.2" diff --git a/rocket/starwars/Cargo.toml b/rocket/starwars/Cargo.toml index 6045055..e1ee71d 100644 --- a/rocket/starwars/Cargo.toml +++ b/rocket/starwars/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Daniel Wiesenberg "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-rocket = "2.0.0" -rocket = { git = "https://github.com/SergioBenitez/Rocket/", rev = "dc2c6ec", default-features = false } #TODO: Change to Cargo crate, when Rocket 0.5.0 is released +async-graphql = { path = "../../..", version = "2.0.3" } +async-graphql-rocket = { path = "../../../integrations/rocket", version = "2.0.3" } +rocket = { git = "https://github.com/SergioBenitez/Rocket/", rev = "8da034a", default-features = false } # TODO: Change to Cargo crate when Rocket 0.5.0 is released starwars = { path = "../../models/starwars" } diff --git a/rocket/starwars/src/main.rs b/rocket/starwars/src/main.rs index 6ac05cb..e165009 100644 --- a/rocket/starwars/src/main.rs +++ b/rocket/starwars/src/main.rs @@ -2,8 +2,8 @@ use async_graphql::{ http::{playground_source, GraphQLPlaygroundConfig}, EmptyMutation, EmptySubscription, Schema, }; -use async_graphql_rocket::{GraphQL, Request, Response}; -use rocket::{http::Status, response::content, routes, State}; +use async_graphql_rocket::{Request, Response}; +use rocket::{response::content, routes, State}; use starwars::{QueryRoot, StarWars}; pub type StarWarsSchema = Schema; @@ -14,18 +14,12 @@ fn graphql_playground() -> content::Html { } #[rocket::post("/?")] -async fn graphql_query( - schema: State<'_, StarWarsSchema>, - query: Request, -) -> Result { +async fn graphql_query(schema: State<'_, StarWarsSchema>, query: Request) -> Response { query.execute(&schema).await } #[rocket::post("/", data = "", format = "application/json")] -async fn graphql_request( - schema: State<'_, StarWarsSchema>, - request: Request, -) -> Result { +async fn graphql_request(schema: State<'_, StarWarsSchema>, request: Request) -> Response { request.execute(&schema).await } @@ -35,7 +29,7 @@ fn rocket() -> rocket::Rocket { .data(StarWars::new()) .finish(); - rocket::ignite().attach(GraphQL::fairing(schema)).mount( + rocket::ignite().manage(schema).mount( "/", routes![graphql_query, graphql_request, graphql_playground], ) diff --git a/tide/dataloader/Cargo.toml b/tide/dataloader/Cargo.toml index be3f207..523f3b6 100644 --- a/tide/dataloader/Cargo.toml +++ b/tide/dataloader/Cargo.toml @@ -5,8 +5,8 @@ authors = ["vkill "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-tide = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-tide = { path = "../../../integrations/tide", version = "2.0.0" } tide = "0.13" async-std = "1.5.0" dataloader = "0.12.0" diff --git a/tide/starwars/Cargo.toml b/tide/starwars/Cargo.toml index f5c7253..7ddc609 100644 --- a/tide/starwars/Cargo.toml +++ b/tide/starwars/Cargo.toml @@ -5,8 +5,8 @@ authors = ["vkill "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-tide = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-tide = { path = "../../../integrations/tide", version = "2.0.0" } tide = "0.13" async-std = "1.5.0" starwars = { path = "../../models/starwars" } diff --git a/tide/token-from-header/Cargo.toml b/tide/token-from-header/Cargo.toml index 6121dec..42397a3 100644 --- a/tide/token-from-header/Cargo.toml +++ b/tide/token-from-header/Cargo.toml @@ -5,8 +5,8 @@ authors = ["vkill "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-tide = "2.0.0" +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-tide = { path = "../../../integrations/tide", version = "2.0.0" } tide = "0.13" async-std = "1.5.0" diff --git a/tide/token-from-header/src/main.rs b/tide/token-from-header/src/main.rs index 367e2ec..f9e2958 100644 --- a/tide/token-from-header/src/main.rs +++ b/tide/token-from-header/src/main.rs @@ -43,7 +43,7 @@ async fn run() -> Result<()> { let mut req = async_graphql_tide::receive_request(req).await?; if let Some(token) = token { - req = req.data(MyToken(token.clone())); + req = req.data(MyToken(token)); } async_graphql_tide::respond(schema.execute(req).await) } diff --git a/warp/starwars/Cargo.toml b/warp/starwars/Cargo.toml index 22425e8..c41e450 100644 --- a/warp/starwars/Cargo.toml +++ b/warp/starwars/Cargo.toml @@ -5,9 +5,9 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } warp = "0.2" starwars = { path = "../../models/starwars" } http = "0.2" diff --git a/warp/subscription/Cargo.toml b/warp/subscription/Cargo.toml index 3036349..959d595 100644 --- a/warp/subscription/Cargo.toml +++ b/warp/subscription/Cargo.toml @@ -5,8 +5,8 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } warp = "0.2" books = { path = "../../models/books" } diff --git a/warp/token-from-header/Cargo.toml b/warp/token-from-header/Cargo.toml index 7fef8da..9264c0b 100644 --- a/warp/token-from-header/Cargo.toml +++ b/warp/token-from-header/Cargo.toml @@ -5,9 +5,9 @@ authors = ["sunli "] edition = "2018" [dependencies] -async-graphql = "2.0.0" -async-graphql-warp = "2.0.0" -tokio = { version = "0.2", features = ["macros"] } +async-graphql = { path = "../../..", version = "2.0.0" } +async-graphql-warp = { path = "../../../integrations/warp", version = "2.0.0" } +tokio = { version = "0.3.0", features = ["macros", "rt-multi-thread"] } warp = "0.2" serde_json = "1.0" serde_derive = "1.0"