diff --git a/client/implementation/pom.xml b/client/implementation/pom.xml
index 9c8d9fd91..31b601218 100644
--- a/client/implementation/pom.xml
+++ b/client/implementation/pom.xml
@@ -70,10 +70,6 @@
jakarta.json
jakarta.json-api
-
- org.eclipse
- yasson
-
io.smallrye.reactive
mutiny
diff --git a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/RequestImpl.java b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/RequestImpl.java
index 4085634a1..deceb9c30 100644
--- a/client/implementation/src/main/java/io/smallrye/graphql/client/impl/RequestImpl.java
+++ b/client/implementation/src/main/java/io/smallrye/graphql/client/impl/RequestImpl.java
@@ -1,5 +1,6 @@
package io.smallrye.graphql.client.impl;
+import java.io.StringReader;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -8,13 +9,10 @@
import jakarta.json.JsonBuilderFactory;
import jakarta.json.JsonObject;
import jakarta.json.JsonObjectBuilder;
-import jakarta.json.JsonStructure;
import jakarta.json.JsonValue;
import jakarta.json.bind.Jsonb;
import jakarta.json.bind.JsonbBuilder;
-import org.eclipse.yasson.internal.JsonBinding;
-
import io.smallrye.graphql.client.Request;
public class RequestImpl implements Request {
@@ -73,9 +71,9 @@ private JsonObject _formatJsonVariables() {
varBuilder.addNull(k);
} else {
try (Jsonb jsonb = JsonbBuilder.create()) {
- JsonStructure struct = ((JsonBinding) jsonb).toJsonStructure(v);
- varBuilder.add(k, struct);
- } catch (Exception ignore) {
+ varBuilder.add(k, Json.createReader(new StringReader(jsonb.toJson(v))).read());
+ } catch (Exception e) {
+ throw new RuntimeException("Error converting variable to JSON", e);
}
}
});