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
This commit is contained in:
Christoph Herzog 2018-01-13 11:06:45 +01:00
parent 5c976ba60d
commit 406bdaa55c
3 changed files with 7 additions and 5 deletions

View file

@ -50,11 +50,10 @@ pub fn graphiql_source(graphql_endpoint_url: &str) -> String {
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/react/16.2.0/umd/react.production.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/react/15.6.0/react-dom.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/react-dom/16.2.0/umd/react-dom.production.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/graphiql/0.10.2/graphiql.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/graphiql/0.11.11/graphiql.min.js"></script>
<script>var GRAPHQL_URL = '{graphql_url}';</script> <script>var GRAPHQL_URL = '{graphql_url}';</script>
{fetcher_source} {fetcher_source}
</body> </body>

View file

@ -1,5 +1,7 @@
//! Utilities for building HTTP endpoints in a library-agnostic manner //! Utilities for building HTTP endpoints in a library-agnostic manner
pub mod graphiql;
use serde::ser; use serde::ser;
use serde::ser::SerializeMap; use serde::ser::SerializeMap;

View file

@ -131,8 +131,9 @@ mod executor;
// This needs to be public until docs have support for private modules: // This needs to be public until docs have support for private modules:
// https://github.com/rust-lang/cargo/issues/1520 // https://github.com/rust-lang/cargo/issues/1520
pub mod integrations; pub mod integrations;
pub mod graphiql;
pub mod http; 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")))] #[cfg(all(test, not(feature = "expose-test-schema")))]
mod tests; mod tests;