Function juniper_actix::graphiql_handler [−][src]
pub async fn graphiql_handler(
graphql_endpoint_url: &str,
subscriptions_endpoint_url: Option<&'static str>
) -> Result<HttpResponse, Error>
Expand description
Create a handler that replies with an HTML page containing GraphiQL. This does not handle routing, so you can mount it on any endpoint
For example:
let app = App::new() .route("/", web::get().to(|| graphiql_handler("/graphql", Some("/graphql/subscriptions"))));