Skip to content

Commit 0e41a51

Browse files
authored
Support latest Rocket master (#919)
1 parent 5ae930b commit 0e41a51

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

juniper_rocket_async/examples/rocket_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use juniper::{
22
tests::fixtures::starwars::schema::{Database, Query},
33
EmptyMutation, EmptySubscription, RootNode,
44
};
5-
use rocket::{response::content, State};
5+
use rocket::{response::content, Rocket, State};
66

77
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
88

@@ -31,7 +31,7 @@ fn post_graphql_handler(
3131

3232
#[rocket::main]
3333
async fn main() {
34-
rocket::ignite()
34+
Rocket::build()
3535
.manage(Database::new())
3636
.manage(Schema::new(
3737
Query,

juniper_rocket_async/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ mod tests {
521521
self, get,
522522
http::ContentType,
523523
local::asynchronous::{Client, LocalResponse},
524-
post, routes, Rocket, State,
524+
post, routes, Build, Rocket, State,
525525
};
526526

527527
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
@@ -608,12 +608,12 @@ mod tests {
608608
assert_eq!(resp.await.status_code, 200);
609609
}
610610

611-
fn make_rocket() -> Rocket {
611+
fn make_rocket() -> Rocket<Build> {
612612
make_rocket_without_routes().mount("/", routes![post_graphql_handler, get_graphql_handler])
613613
}
614614

615-
fn make_rocket_without_routes() -> Rocket {
616-
rocket::ignite().manage(Database::new()).manage(Schema::new(
615+
fn make_rocket_without_routes() -> Rocket<Build> {
616+
Rocket::build().manage(Database::new()).manage(Schema::new(
617617
Query,
618618
EmptyMutation::<Database>::new(),
619619
EmptySubscription::<Database>::new(),

0 commit comments

Comments
 (0)