From f34334bbd2fb4c1af70d438085e4ceca7d4b142b Mon Sep 17 00:00:00 2001 From: Sunli Date: Wed, 27 Oct 2021 20:06:33 +0800 Subject: [PATCH] Bump poem to `1.0.13` --- examples | 2 +- integrations/poem/Cargo.toml | 2 +- integrations/poem/src/extractor.rs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples b/examples index 290ef715..1683aac1 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 290ef715b2a6be346acc16ddd406f844e8ed3bfd +Subproject commit 1683aac1883a6acf27747bf3e22491fa13aa538f diff --git a/integrations/poem/Cargo.toml b/integrations/poem/Cargo.toml index 78594a7a..a8ad7713 100644 --- a/integrations/poem/Cargo.toml +++ b/integrations/poem/Cargo.toml @@ -14,7 +14,7 @@ categories = ["network-programming", "asynchronous"] [dependencies] async-graphql = { path = "../..", version = "=2.10.7" } -poem = { version = "1.0.11", features = ["websocket"] } +poem = { version = "1.0.13", features = ["websocket"] } futures-util = { version = "0.3.13", default-features = false } serde_json = "1.0.66" tokio-util = { version = "0.6.7", features = ["compat"] } diff --git a/integrations/poem/src/extractor.rs b/integrations/poem/src/extractor.rs index 4776b2e2..4e09a66e 100644 --- a/integrations/poem/src/extractor.rs +++ b/integrations/poem/src/extractor.rs @@ -64,7 +64,7 @@ impl<'a> FromRequest<'a> for GraphQLBatchRequest { async fn from_request(req: &'a Request, body: &mut RequestBody) -> Result { if req.method() == Method::GET { - let req = Query::from_request(req, body).await.map_err(BadRequest)?.0; + let req = Query::from_request(req, body).await?.0; Ok(Self(async_graphql::BatchRequest::Single(req))) } else { let content_type = req @@ -78,8 +78,7 @@ impl<'a> FromRequest<'a> for GraphQLBatchRequest { body.take()?.into_async_read().compat(), MultipartOptions::default(), ) - .await - .map_err(BadRequest)?, + .await?, )) } }