diff --git a/juniper_rocket/CHANGELOG.md b/juniper_rocket/CHANGELOG.md index 64a4faf7..39fda1a6 100644 --- a/juniper_rocket/CHANGELOG.md +++ b/juniper_rocket/CHANGELOG.md @@ -11,6 +11,7 @@ All user visible changes to `juniper_rocket` crate will be documented in this fi ### BC Breaks - Switched to 0.16 version of [`juniper` crate]. +- Switched to 0.5.0-rc.2 version of [`rocket` crate]. ### Added @@ -30,4 +31,5 @@ See [old CHANGELOG](/../../blob/juniper_rocket-v0.8.1/juniper_rocket/CHANGELOG.m [`juniper` crate]: https://docs.rs/juniper +[`rocket` crate]: https://docs.rs/rocket [Semantic Versioning 2.0.0]: https://semver.org diff --git a/juniper_rocket/Cargo.toml b/juniper_rocket/Cargo.toml index a8fdf409..92407b02 100644 --- a/juniper_rocket/Cargo.toml +++ b/juniper_rocket/Cargo.toml @@ -19,7 +19,7 @@ exclude = ["/examples/", "/tests/", "/release.toml"] [dependencies] futures = "0.3.1" juniper = { version = "0.16.0-dev", path = "../juniper", default-features = false } -rocket = { version = "0.5.0-rc.1", default-features = false } +rocket = { version = "0.5.0-rc.2", default-features = false } serde_json = "1.0.2" [dev-dependencies] diff --git a/juniper_rocket/examples/rocket_server.rs b/juniper_rocket/examples/rocket_server.rs index 76a6b296..16ae6d12 100644 --- a/juniper_rocket/examples/rocket_server.rs +++ b/juniper_rocket/examples/rocket_server.rs @@ -2,12 +2,12 @@ use juniper::{ tests::fixtures::starwars::schema::{Database, Query}, EmptyMutation, EmptySubscription, RootNode, }; -use rocket::{response::content, Rocket, State}; +use rocket::{response::content, State}; type Schema = RootNode<'static, Query, EmptyMutation<Database>, EmptySubscription<Database>>; #[rocket::get("/")] -fn graphiql() -> content::Html<String> { +fn graphiql() -> content::RawHtml<String> { juniper_rocket::graphiql_source("/graphql", None) } @@ -31,7 +31,7 @@ fn post_graphql_handler( #[rocket::main] async fn main() { - Rocket::build() + let _ = rocket::build() .manage(Database::new()) .manage(Schema::new( Query, diff --git a/juniper_rocket/src/lib.rs b/juniper_rocket/src/lib.rs index 6cc1bf85..e6e60bee 100644 --- a/juniper_rocket/src/lib.rs +++ b/juniper_rocket/src/lib.rs @@ -46,8 +46,8 @@ pub struct GraphQLResponse(pub Status, pub String); pub fn graphiql_source( graphql_endpoint_url: &str, subscriptions_endpoint_url: Option<&str>, -) -> content::Html<String> { - content::Html(juniper::http::graphiql::graphiql_source( +) -> content::RawHtml<String> { + content::RawHtml(juniper::http::graphiql::graphiql_source( graphql_endpoint_url, subscriptions_endpoint_url, )) @@ -57,8 +57,8 @@ pub fn graphiql_source( pub fn playground_source( graphql_endpoint_url: &str, subscriptions_endpoint_url: Option<&str>, -) -> content::Html<String> { - content::Html(juniper::http::playground::playground_source( +) -> content::RawHtml<String> { + content::RawHtml(juniper::http::playground::playground_source( graphql_endpoint_url, subscriptions_endpoint_url, ))