diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/controller/GraphQLController.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/controller/GraphQLController.kt
index 3c0c4e03..d190746c 100644
--- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/controller/GraphQLController.kt
+++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/controller/GraphQLController.kt
@@ -7,6 +7,7 @@
package suwayomi.tachidesk.graphql.controller
+import io.javalin.http.ContentType
import io.javalin.http.Context
import io.javalin.websocket.WsConfig
import suwayomi.tachidesk.graphql.server.TachideskGraphQLServer
@@ -25,10 +26,8 @@ object GraphQLController {
}
fun playground(ctx: Context) {
- val body = javaClass.getResourceAsStream("/graphql-playground.html")!!.bufferedReader().use { reader ->
- reader.readText()
- }
- ctx.html(body)
+ ctx.contentType(ContentType.TEXT_HTML)
+ ctx.result(javaClass.getResourceAsStream("/graphql-playground.html")!!)
}
fun webSocket(ws: WsConfig) {
diff --git a/server/src/main/resources/graphql-playground.html b/server/src/main/resources/graphql-playground.html
index a6ba496e..f26cb14c 100644
--- a/server/src/main/resources/graphql-playground.html
+++ b/server/src/main/resources/graphql-playground.html
@@ -41,6 +41,22 @@