From fbf726c17434212cdf94b39f52a25a0050d77287 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:49:33 +0200 Subject: [PATCH] Use "AsyncExecutionStrategy" for mutations (#932) Batching only works with "AsyncExecutionStrategy" and by default mutations use "SerialExecutionStrategy" --- .../suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt index 05cca0e8..4ca11b6c 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/server/TachideskGraphQLServer.kt @@ -12,6 +12,7 @@ import com.expediagroup.graphql.server.execution.GraphQLRequestHandler import com.expediagroup.graphql.server.execution.GraphQLServer import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import graphql.GraphQL +import graphql.execution.AsyncExecutionStrategy import io.javalin.http.Context import io.javalin.websocket.WsCloseContext import io.javalin.websocket.WsMessageContext @@ -47,6 +48,7 @@ class TachideskGraphQLServer( private fun getGraphQLObject(): GraphQL = GraphQL.newGraphQL(schema) .subscriptionExecutionStrategy(FlowSubscriptionExecutionStrategy()) + .mutationExecutionStrategy(AsyncExecutionStrategy()) .build() fun create(): TachideskGraphQLServer {