Support latest Rocket master (#919)
This commit is contained in:
parent
5ae930bfc7
commit
0e41a51789
2 changed files with 6 additions and 6 deletions
|
@ -2,7 +2,7 @@ use juniper::{
|
||||||
tests::fixtures::starwars::schema::{Database, Query},
|
tests::fixtures::starwars::schema::{Database, Query},
|
||||||
EmptyMutation, EmptySubscription, RootNode,
|
EmptyMutation, EmptySubscription, RootNode,
|
||||||
};
|
};
|
||||||
use rocket::{response::content, State};
|
use rocket::{response::content, Rocket, State};
|
||||||
|
|
||||||
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ fn post_graphql_handler(
|
||||||
|
|
||||||
#[rocket::main]
|
#[rocket::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
rocket::ignite()
|
Rocket::build()
|
||||||
.manage(Database::new())
|
.manage(Database::new())
|
||||||
.manage(Schema::new(
|
.manage(Schema::new(
|
||||||
Query,
|
Query,
|
||||||
|
|
|
@ -521,7 +521,7 @@ mod tests {
|
||||||
self, get,
|
self, get,
|
||||||
http::ContentType,
|
http::ContentType,
|
||||||
local::asynchronous::{Client, LocalResponse},
|
local::asynchronous::{Client, LocalResponse},
|
||||||
post, routes, Rocket, State,
|
post, routes, Build, Rocket, State,
|
||||||
};
|
};
|
||||||
|
|
||||||
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>;
|
||||||
|
@ -608,12 +608,12 @@ mod tests {
|
||||||
assert_eq!(resp.await.status_code, 200);
|
assert_eq!(resp.await.status_code, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_rocket() -> Rocket {
|
fn make_rocket() -> Rocket<Build> {
|
||||||
make_rocket_without_routes().mount("/", routes![post_graphql_handler, get_graphql_handler])
|
make_rocket_without_routes().mount("/", routes![post_graphql_handler, get_graphql_handler])
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_rocket_without_routes() -> Rocket {
|
fn make_rocket_without_routes() -> Rocket<Build> {
|
||||||
rocket::ignite().manage(Database::new()).manage(Schema::new(
|
Rocket::build().manage(Database::new()).manage(Schema::new(
|
||||||
Query,
|
Query,
|
||||||
EmptyMutation::<Database>::new(),
|
EmptyMutation::<Database>::new(),
|
||||||
EmptySubscription::<Database>::new(),
|
EmptySubscription::<Database>::new(),
|
||||||
|
|
Loading…
Reference in a new issue