diff --git a/docs/book/content/advanced/dataloaders.md b/docs/book/content/advanced/dataloaders.md index 8dd2f858..fe172d1d 100644 --- a/docs/book/content/advanced/dataloaders.md +++ b/docs/book/content/advanced/dataloaders.md @@ -48,7 +48,7 @@ DataLoader caching does not replace Redis, Memcache, or any other shared applica ```toml [dependencies] -actix-identity = "0.4.0-beta.2" +actix-identity = "0.4.0-beta.4" actix-rt = "1.0" actix-web = {version = "2.0", features = []} juniper = { git = "https://github.com/graphql-rust/juniper" } diff --git a/examples/actix_subscriptions/Cargo.toml b/examples/actix_subscriptions/Cargo.toml index 95bf4898..3cf88614 100644 --- a/examples/actix_subscriptions/Cargo.toml +++ b/examples/actix_subscriptions/Cargo.toml @@ -6,8 +6,8 @@ authors = ["Mihai Dinculescu <mihai.dinculescu@outlook.com>"] publish = false [dependencies] -actix-web = "4.0.0-beta.8" -actix-cors = "0.6.0-beta.2" +actix-web = "4.0.0-beta.12" +actix-cors = "0.6.0-beta.4" futures = "0.3" env_logger = "0.9" serde = "1.0" diff --git a/juniper_actix/Cargo.toml b/juniper_actix/Cargo.toml index fb01ee65..d5730bd7 100644 --- a/juniper_actix/Cargo.toml +++ b/juniper_actix/Cargo.toml @@ -13,10 +13,10 @@ subscriptions = ["juniper_graphql_ws", "tokio"] [dependencies] actix = "0.12" -actix-http = "3.0.0-beta.8" +actix-http = "3.0.0-beta.13" http = "0.2.4" -actix-web = "4.0.0-beta.8" -actix-web-actors = "4.0.0-beta.6" +actix-web = "4.0.0-beta.12" +actix-web-actors = "4.0.0-beta.7" juniper = { version = "0.15.7", path = "../juniper", default-features = false } juniper_graphql_ws = { version = "0.3.0", path = "../juniper_graphql_ws", optional = true } @@ -30,11 +30,11 @@ tokio = { version = "1.0", features = ["sync"], optional = true } [dev-dependencies] actix-rt = "2" -actix-cors = "0.6.0-beta.2" -actix-identity = "0.4.0-beta.2" +actix-cors = "0.6.0-beta.4" +actix-identity = "0.4.0-beta.4" tokio = "1.0" async-stream = "0.3" -actix-test = "0.1.0-beta.3" +actix-test = "0.1.0-beta.6" juniper = { version = "0.15.7", path = "../juniper", features = ["expose-test-schema"] } diff --git a/juniper_actix/src/lib.rs b/juniper_actix/src/lib.rs index 279f246a..d1b89da5 100644 --- a/juniper_actix/src/lib.rs +++ b/juniper_actix/src/lib.rs @@ -467,7 +467,14 @@ pub mod subscriptions { #[cfg(test)] mod tests { use actix_http::body::AnyBody; - use actix_web::{dev::ServiceResponse, http, http::header::CONTENT_TYPE, test, web::Data, App}; + use actix_web::{ + dev::ServiceResponse, + http, + http::header::CONTENT_TYPE, + test::{self, TestRequest}, + web::Data, + App, + }; use juniper::{ http::tests::{run_http_test_suite, HttpIntegration, TestResponse}, tests::fixtures::starwars::schema::{Database, Query}, @@ -509,7 +516,7 @@ mod tests { } let mut app = test::init_service(App::new().route("/", web::get().to(graphql_handler))).await; - let req = test::TestRequest::get() + let req = TestRequest::get() .uri("/") .append_header((ACCEPT, "text/html")) .to_request(); @@ -525,7 +532,7 @@ mod tests { } let mut app = test::init_service(App::new().route("/", web::get().to(graphql_handler))).await; - let req = test::TestRequest::get() + let req = TestRequest::get() .uri("/") .append_header((ACCEPT, "text/html")) .to_request(); @@ -550,7 +557,7 @@ mod tests { } let mut app = test::init_service(App::new().route("/", web::get().to(graphql_handler))).await; - let req = test::TestRequest::get() + let req = TestRequest::get() .uri("/") .append_header((ACCEPT, "text/html")) .to_request(); @@ -566,7 +573,7 @@ mod tests { } let mut app = test::init_service(App::new().route("/", web::get().to(graphql_handler))).await; - let req = test::TestRequest::get() + let req = TestRequest::get() .uri("/") .append_header((ACCEPT, "text/html")) .to_request(); @@ -589,7 +596,7 @@ mod tests { EmptySubscription::<Database>::new(), ); - let req = test::TestRequest::post() + let req = TestRequest::post() .append_header(("content-type", "application/json; charset=utf-8")) .set_payload( r##"{ "variables": null, "query": "{ hero(episode: NEW_HOPE) { name } }" }"##, @@ -625,7 +632,7 @@ mod tests { EmptySubscription::<Database>::new(), ); - let req = test::TestRequest::get() + let req = TestRequest::get() .append_header(("content-type", "application/json")) .uri("/?query=%7B%20hero%28episode%3A%20NEW_HOPE%29%20%7B%20name%20%7D%20%7D&variables=null") .to_request(); @@ -663,7 +670,7 @@ mod tests { EmptySubscription::<Database>::new(), ); - let req = test::TestRequest::post() + let req = TestRequest::post() .append_header(("content-type", "application/json")) .set_payload( r##"[ @@ -705,7 +712,7 @@ mod tests { pub struct TestActixWebIntegration; impl TestActixWebIntegration { - fn make_request(&self, req: test::TestRequest) -> TestResponse { + fn make_request(&self, req: TestRequest) -> TestResponse { actix_web::rt::System::new().block_on(async move { let schema = Schema::new( Query, @@ -728,12 +735,12 @@ mod tests { impl HttpIntegration for TestActixWebIntegration { fn get(&self, url: &str) -> TestResponse { - self.make_request(test::TestRequest::get().uri(url)) + self.make_request(TestRequest::get().uri(url)) } fn post_json(&self, url: &str, body: &str) -> TestResponse { self.make_request( - test::TestRequest::post() + TestRequest::post() .append_header(("content-type", "application/json")) .set_payload(body.to_string()) .uri(url), @@ -742,7 +749,7 @@ mod tests { fn post_graphql(&self, url: &str, body: &str) -> TestResponse { self.make_request( - test::TestRequest::post() + TestRequest::post() .append_header(("content-type", "application/graphql")) .set_payload(body.to_string()) .uri(url),