Bump poem to 1.0.13

This commit is contained in:
Sunli 2021-10-27 20:06:33 +08:00
parent f1fda411b9
commit f34334bbd2
3 changed files with 4 additions and 5 deletions

@ -1 +1 @@
Subproject commit 290ef715b2a6be346acc16ddd406f844e8ed3bfd
Subproject commit 1683aac1883a6acf27747bf3e22491fa13aa538f

View File

@ -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"] }

View File

@ -64,7 +64,7 @@ impl<'a> FromRequest<'a> for GraphQLBatchRequest {
async fn from_request(req: &'a Request, body: &mut RequestBody) -> Result<Self> {
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?,
))
}
}