Fix GraphQL formatting
This commit is contained in:
parent
413800515f
commit
651700ca62
@ -28,7 +28,7 @@ public final class GraphQLApi {
|
|||||||
protected Optional<JsonObject> execute(final String query) {
|
protected Optional<JsonObject> execute(final String query) {
|
||||||
final HttpResponse<String> response;
|
final HttpResponse<String> response;
|
||||||
final HttpRequest request = HttpRequest.newBuilder()
|
final HttpRequest request = HttpRequest.newBuilder()
|
||||||
.POST(HttpRequest.BodyPublishers.ofString("{\"query\":\"" + query + "\"}"))
|
.POST(HttpRequest.BodyPublishers.ofString("{\"query\":\"" + query.replace("\"", "\\\"") + "\"}"))
|
||||||
.uri(this.uri)
|
.uri(this.uri)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user