Skip to content

Commit

Permalink
Merge pull request #1376 from phillip-kruger/jakarta2
Browse files Browse the repository at this point in the history
Added back deprecated method
  • Loading branch information
phillip-kruger authored May 3, 2022
2 parents 223c32b + a236160 commit 5dfeae0
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5dfeae0

Please sign in to comment.