Skip to content

Commit 923f037

Browse files
committed
Upgrade juniper_warp to warp 0.1.8
This unbreaks the build, as the newer warp deprecates some of the filters we were using and we had `deny_warnings` on.
1 parent cf7e8df commit 923f037

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

juniper_warp/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# [master]
2+
3+
- **Breaking Change**: Bump required `warp` version to `0.1.8`.
4+
5+
# juniper_warp [0.1] 2018-09-13
6+
7+
- Initial Release

juniper_warp/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "juniper_warp"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["Tom Houlé <[email protected]>"]
55
description = "Juniper GraphQL integration with Warp"
66
license = "BSD-2-Clause"
77
documentation = "https://docs.rs/juniper_warp"
88
repository = "https://github.com/graphql-rust/juniper"
99

1010
[dependencies]
11-
warp = "0.1.2"
11+
warp = "0.1.8"
1212
juniper = { path = "../juniper", version = ">=0.9, 0.10.0", default-features = false }
1313
serde_json = "1.0.24"
1414
serde_derive = "1.0.75"

juniper_warp/examples/warp_server/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323

2424
let log = log("warp_server");
2525

26-
let homepage = warp::index().map(|| {
26+
let homepage = warp::path::end().map(|| {
2727
Response::builder()
2828
.header("content-type", "text/html")
2929
.body(format!(

juniper_warp/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ where
202202
Ok((serde_json::to_vec(&response)?, response.is_ok()))
203203
})
204204
}).and_then(|result| ::futures::future::done(Ok(build_response(result))))
205-
.map_err(|_: tokio_threadpool::BlockingError| warp::reject::server_error()),
205+
.map_err(|e: tokio_threadpool::BlockingError| warp::reject::custom(e)),
206206
)
207207
};
208208

@@ -235,7 +235,7 @@ where
235235
Ok((serde_json::to_vec(&response)?, response.is_ok()))
236236
})
237237
}).and_then(|result| ::futures::future::done(Ok(build_response(result))))
238-
.map_err(|_: tokio_threadpool::BlockingError| warp::reject::server_error()),
238+
.map_err(|e: tokio_threadpool::BlockingError| warp::reject::custom(e)),
239239
)
240240
};
241241

@@ -434,7 +434,7 @@ mod tests_http_harness {
434434
let schema: Schema = RootNode::new(Database::new(), EmptyMutation::<Database>::new());
435435

436436
let state = warp::any().map(move || Database::new());
437-
let filter = warp::filters::path::index().and(make_graphql_filter(schema, state.boxed()));
437+
let filter = warp::filters::path::end().and(make_graphql_filter(schema, state.boxed()));
438438

439439
filter.boxed()
440440
}

0 commit comments

Comments
 (0)