diff --git a/juniper_rocket/CHANGELOG.md b/juniper_rocket/CHANGELOG.md index 7f0e099d..064bca28 100644 --- a/juniper_rocket/CHANGELOG.md +++ b/juniper_rocket/CHANGELOG.md @@ -2,7 +2,11 @@ - Compatibility with the latest `juniper`. -# [[0.8.0] 2021-07-08](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-0.8.0) +# [[0.8.1] 2022-03-29](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-v0.8.1) + +- Ability to set custom request body size limit ([#1044](https://github.com/graphql-rust/juniper/pull/1044)). + +# [[0.8.0] 2021-07-08](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-v0.8.0) - Require async rocket support (`rocket` >= 0.5-rc1). - Compatibility with the latest `juniper`. diff --git a/juniper_rocket/Cargo.toml b/juniper_rocket/Cargo.toml index a518356d..d330b51d 100644 --- a/juniper_rocket/Cargo.toml +++ b/juniper_rocket/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "juniper_rocket" -version = "0.8.0" +version = "0.8.1" edition = "2018" authors = [ "Magnus Hallin ", diff --git a/juniper_rocket/src/lib.rs b/juniper_rocket/src/lib.rs index 2ab7898d..71b52ebe 100644 --- a/juniper_rocket/src/lib.rs +++ b/juniper_rocket/src/lib.rs @@ -337,8 +337,9 @@ where }; Box::pin(async move { + let limit = req.limits().get("graphql").unwrap_or(BODY_LIMIT.bytes()); + let mut reader = data.open(limit); let mut body = String::new(); - let mut reader = data.open(BODY_LIMIT.bytes()); if let Err(e) = reader.read_to_string(&mut body).await { return Failure((Status::InternalServerError, format!("{:?}", e))); }