[−][src]Function juniper_warp::graphiql_filter
pub fn graphiql_filter(
graphql_endpoint_url: &'static str,
subscriptions_endpoint: Option<&'static str>
) -> BoxedFilter<(Response<Vec<u8>>,)>
Create a filter that replies with an HTML page containing GraphiQL. This does not handle routing, so you can mount it on any endpoint.
For example:
let graphiql_route = warp::path("graphiql").and(graphiql_filter("/graphql", None));
Or with subscriptions support, provide the subscriptions endpoint URL:
let graphiql_route = warp::path("graphiql").and(graphiql_filter("/graphql", Some("ws://localhost:8080/subscriptions")));