diff --git a/server/implementation/src/main/java/io/smallrye/graphql/execution/ExecutionService.java b/server/implementation/src/main/java/io/smallrye/graphql/execution/ExecutionService.java index d9a41b7a8..2a472139d 100644 --- a/server/implementation/src/main/java/io/smallrye/graphql/execution/ExecutionService.java +++ b/server/implementation/src/main/java/io/smallrye/graphql/execution/ExecutionService.java @@ -83,6 +83,21 @@ public ExecutionService(GraphQLSchema graphQLSchema, Schema schema, ExecutionStr this.payloadOption = config.logPayload(); } + @Deprecated + public ExecutionResponse execute(JsonObject jsonInput) { + try { + JsonObjectResponseWriter jsonObjectResponseWriter = new JsonObjectResponseWriter(jsonInput); + executeSync(jsonInput, jsonObjectResponseWriter); + return jsonObjectResponseWriter.getExecutionResponse(); + } catch (Throwable t) { + if (t.getClass().isAssignableFrom(RuntimeException.class)) { + throw (RuntimeException) t; + } else { + throw new RuntimeException(t); + } + } + } + public void executeSync(JsonObject jsonInput, ExecutionResponseWriter writer) { executeSync(jsonInput, new HashMap<>(), writer); }