Skip to content

Commit 2cb026f

Browse files
authored
Support latest rocket 0.4 (#940)
There was a regression: rwf2/Rocket#1647 Fixes #939.
1 parent d3896bd commit 2cb026f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

juniper_rocket/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# master
22

3+
- Minimum `rocket` version is now `0.4.9`. Note this also bumps the [minimum required `rustc` version](https://github.com/SergioBenitez/Rocket/blob/v0.4/CHANGELOG.md#version-048-may-18-2021).
34
- Compatibility with the latest `juniper`.
45

56
# [[0.6.3] 2021-04-03](https://github.com/graphql-rust/juniper/releases/tag/juniper_rocket-0.6.3)

juniper_rocket/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository = "https://github.com/graphql-rust/juniper"
1313

1414
[dependencies]
1515
juniper = { version = "0.15.5", path = "../juniper", default-features = false}
16-
rocket = { version = "0.4.2", default-features = false }
16+
rocket = { version = "0.4.9", default-features = false }
1717
serde_json = "1.0.2"
1818

1919
[dev-dependencies]

juniper_rocket/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ where
277277
let mut body = String::new();
278278
data.open()
279279
.read_to_string(&mut body)
280-
.map_err(|e| Err((Status::InternalServerError, format!("{:?}", e))))?;
280+
.map_err(|e| (Status::InternalServerError, format!("{:?}", e)))?;
281281

282282
Success(GraphQLRequest(if is_json {
283-
serde_json::from_str(&body).map_err(|e| Err((Status::BadRequest, format!("{}", e))))?
283+
serde_json::from_str(&body).map_err(|e| (Status::BadRequest, format!("{}", e)))?
284284
} else {
285285
GraphQLBatchRequest::Single(http::GraphQLRequest::new(body, None, None))
286286
}))

0 commit comments

Comments
 (0)