1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

refactor: use graduated Html responder

This commit is contained in:
Rob Ede
2024-07-07 00:23:03 +01:00
parent 10aff3cdb1
commit a67c7803e6
13 changed files with 27 additions and 40 deletions

View File

@ -1,5 +1,4 @@
use actix_web::{get, route, web, Error, HttpResponse, Responder};
use actix_web_lab::respond::Html;
use juniper::http::{graphiql::graphiql_source, GraphQLRequest};
use crate::{
@ -26,7 +25,7 @@ pub async fn graphql(
/// GraphiQL UI
#[get("/graphiql")]
async fn graphql_playground() -> impl Responder {
Html(graphiql_source("/graphql", None))
web::Html::new(graphiql_source("/graphql", None))
}
pub fn register(config: &mut web::ServiceConfig) {