From 406bdaa55ca86c58579acc078df0465fadc97ad1 Mon Sep 17 00:00:00 2001 From: Christoph Herzog Date: Sat, 13 Jan 2018 11:06:45 +0100 Subject: [PATCH] Update embedded graphiql + move graphiql to http module * Update graphiql to 0.11 and react to v16. * Move graphiql to be a submodule of http --- juniper/src/{ => http}/graphiql.rs | 7 +++---- juniper/src/{http.rs => http/mod.rs} | 2 ++ juniper/src/lib.rs | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) rename juniper/src/{ => http}/graphiql.rs (85%) rename juniper/src/{http.rs => http/mod.rs} (99%) diff --git a/juniper/src/graphiql.rs b/juniper/src/http/graphiql.rs similarity index 85% rename from juniper/src/graphiql.rs rename to juniper/src/http/graphiql.rs index 7e0d11c6..09a49b07 100644 --- a/juniper/src/graphiql.rs +++ b/juniper/src/http/graphiql.rs @@ -50,11 +50,10 @@ pub fn graphiql_source(graphql_endpoint_url: &str) -> String {
- - - - + + + {fetcher_source} diff --git a/juniper/src/http.rs b/juniper/src/http/mod.rs similarity index 99% rename from juniper/src/http.rs rename to juniper/src/http/mod.rs index 6fd593f2..10640765 100644 --- a/juniper/src/http.rs +++ b/juniper/src/http/mod.rs @@ -1,5 +1,7 @@ //! Utilities for building HTTP endpoints in a library-agnostic manner +pub mod graphiql; + use serde::ser; use serde::ser::SerializeMap; diff --git a/juniper/src/lib.rs b/juniper/src/lib.rs index 90595b3f..a08b9375 100644 --- a/juniper/src/lib.rs +++ b/juniper/src/lib.rs @@ -131,8 +131,9 @@ mod executor; // This needs to be public until docs have support for private modules: // https://github.com/rust-lang/cargo/issues/1520 pub mod integrations; -pub mod graphiql; pub mod http; +// TODO: remove this alias export in 0.10. (breaking change) +pub use http::graphiql; #[cfg(all(test, not(feature = "expose-test-schema")))] mod tests;