diff --git a/juniper_rocket_async/examples/rocket_server.rs b/juniper_rocket_async/examples/rocket_server.rs index f8a1ca0d..9716ad35 100644 --- a/juniper_rocket_async/examples/rocket_server.rs +++ b/juniper_rocket_async/examples/rocket_server.rs @@ -2,7 +2,7 @@ use juniper::{ tests::fixtures::starwars::schema::{Database, Query}, EmptyMutation, EmptySubscription, RootNode, }; -use rocket::{response::content, State}; +use rocket::{response::content, Rocket, State}; type Schema = RootNode<'static, Query, EmptyMutation, EmptySubscription>; @@ -31,7 +31,7 @@ fn post_graphql_handler( #[rocket::main] async fn main() { - rocket::ignite() + Rocket::build() .manage(Database::new()) .manage(Schema::new( Query, diff --git a/juniper_rocket_async/src/lib.rs b/juniper_rocket_async/src/lib.rs index 043e59ca..9a9ffdd0 100644 --- a/juniper_rocket_async/src/lib.rs +++ b/juniper_rocket_async/src/lib.rs @@ -521,7 +521,7 @@ mod tests { self, get, http::ContentType, local::asynchronous::{Client, LocalResponse}, - post, routes, Rocket, State, + post, routes, Build, Rocket, State, }; type Schema = RootNode<'static, Query, EmptyMutation, EmptySubscription>; @@ -608,12 +608,12 @@ mod tests { assert_eq!(resp.await.status_code, 200); } - fn make_rocket() -> Rocket { + fn make_rocket() -> Rocket { make_rocket_without_routes().mount("/", routes![post_graphql_handler, get_graphql_handler]) } - fn make_rocket_without_routes() -> Rocket { - rocket::ignite().manage(Database::new()).manage(Schema::new( + fn make_rocket_without_routes() -> Rocket { + Rocket::build().manage(Database::new()).manage(Schema::new( Query, EmptyMutation::::new(), EmptySubscription::::new(),