mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-03 02:44:34 -05:00
Use Graphiql with the Explorer plugin for the query builder
This commit is contained in:
@@ -25,18 +25,10 @@ object GraphQLController {
|
||||
}
|
||||
|
||||
fun playground(ctx: Context) {
|
||||
val playgroundHtml = javaClass.getResource("/graphql-playground.html")
|
||||
|
||||
val body = playgroundHtml.openStream().bufferedReader().use { reader ->
|
||||
val graphQLEndpoint = "graphql"
|
||||
val subscriptionsEndpoint = "graphql"
|
||||
|
||||
val body = javaClass.getResourceAsStream("/graphql-playground.html")!!.bufferedReader().use { reader ->
|
||||
reader.readText()
|
||||
.replace("\${graphQLEndpoint}", graphQLEndpoint)
|
||||
.replace("\${subscriptionsEndpoint}", subscriptionsEndpoint)
|
||||
}
|
||||
|
||||
ctx.html(body ?: "Could not load playground")
|
||||
ctx.html(body)
|
||||
}
|
||||
|
||||
fun webSocket(ws: WsConfig) {
|
||||
|
||||
Reference in New Issue
Block a user