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;