From 86615a0e1a28380bd3e6470bf02c315e45d1448a Mon Sep 17 00:00:00 2001 From: Marek Skacelik Date: Sun, 5 May 2024 17:30:59 +0200 Subject: [PATCH] Fixed dependencies, removed Sys. println --- client/api/pom.xml | 6 ------ client/implementation-vertx/pom.xml | 7 ++++++- .../java/test/tck/TypesafeTckClientModelSuite.java | 2 -- client/implementation/pom.xml | 4 ++++ client/model-builder/pom.xml | 10 ++++++---- .../graphql/client/model/helper/OperationModel.java | 6 ++---- .../graphql/client/model/ClientModelBuilderTest.java | 3 ++- 7 files changed, 20 insertions(+), 18 deletions(-) diff --git a/client/api/pom.xml b/client/api/pom.xml index c89607292..3a18827fa 100644 --- a/client/api/pom.xml +++ b/client/api/pom.xml @@ -30,18 +30,12 @@ microprofile-config-api provided - io.smallrye.reactive mutiny provided - - io.smallrye - smallrye-graphql-client-model - - org.junit.jupiter junit-jupiter diff --git a/client/implementation-vertx/pom.xml b/client/implementation-vertx/pom.xml index b99c49366..3c7b17418 100644 --- a/client/implementation-vertx/pom.xml +++ b/client/implementation-vertx/pom.xml @@ -18,7 +18,7 @@ io.smallrye - smallrye-graphql-client-model-builder + smallrye-graphql-client-model io.smallrye.config @@ -50,5 +50,10 @@ mockito-junit-jupiter test + + io.smallrye + smallrye-graphql-client-model-builder + test + diff --git a/client/implementation-vertx/src/test/java/test/tck/TypesafeTckClientModelSuite.java b/client/implementation-vertx/src/test/java/test/tck/TypesafeTckClientModelSuite.java index 010ae825a..4957dda6d 100644 --- a/client/implementation-vertx/src/test/java/test/tck/TypesafeTckClientModelSuite.java +++ b/client/implementation-vertx/src/test/java/test/tck/TypesafeTckClientModelSuite.java @@ -17,7 +17,6 @@ import org.junit.jupiter.api.Test; import org.junit.platform.suite.api.ExcludeClassNamePatterns; -import io.smallrye.graphql.client.GraphQLClient; import io.smallrye.graphql.client.model.ClientModelBuilder; import io.smallrye.graphql.client.model.ClientModels; import tck.graphql.typesafe.Animal; @@ -87,7 +86,6 @@ private static Index createIndexExcludingClasses(File directory, String classNam // SOME OTHER CLASSES TO BE ADDED TO INDEX try { indexer.indexClass(Input.class); - indexer.indexClass(GraphQLClient.class); indexer.indexClass(Closeable.class); indexer.indexClass(AutoCloseable.class); } catch (IOException e) { diff --git a/client/implementation/pom.xml b/client/implementation/pom.xml index a139b01c3..d79cec68f 100644 --- a/client/implementation/pom.xml +++ b/client/implementation/pom.xml @@ -78,6 +78,10 @@ io.smallrye.reactive mutiny + + io.smallrye + smallrye-graphql-client-model + diff --git a/client/model-builder/pom.xml b/client/model-builder/pom.xml index 34b522d23..62e012663 100644 --- a/client/model-builder/pom.xml +++ b/client/model-builder/pom.xml @@ -26,6 +26,7 @@ jboss-logging provided + io.smallrye smallrye-graphql-client-api @@ -38,16 +39,17 @@ io.smallrye.reactive mutiny - - io.smallrye - smallrye-graphql-client - org.junit.jupiter junit-jupiter test + + io.smallrye + smallrye-graphql-api + test + diff --git a/client/model-builder/src/main/java/io/smallrye/graphql/client/model/helper/OperationModel.java b/client/model-builder/src/main/java/io/smallrye/graphql/client/model/helper/OperationModel.java index 1d23208ab..4add9f429 100644 --- a/client/model-builder/src/main/java/io/smallrye/graphql/client/model/helper/OperationModel.java +++ b/client/model-builder/src/main/java/io/smallrye/graphql/client/model/helper/OperationModel.java @@ -21,7 +21,6 @@ import org.jboss.jandex.MethodInfo; import io.smallrye.graphql.client.core.OperationType; -import io.smallrye.graphql.client.impl.SmallRyeGraphQLClientMessages; import io.smallrye.graphql.client.model.MethodKey; /** @@ -71,7 +70,7 @@ public static OperationModel of(MethodInfo method) { */ public String fields(TypeModel type) { if (typeStack.contains(type.getName())) - throw SmallRyeGraphQLClientMessages.msg.fieldRecursionFound(); + throw new IllegalStateException("field recursion found"); try { typeStack.push(type.getName()); return recursionCheckedFields(type); @@ -224,11 +223,10 @@ public Optional mutationName() { } /** - * Gets the name of the GraphQL subscription, considering any {@link io.smallrye.graphql.api.Subscription} annotation. + * Gets the name of the GraphQL subscription, considering any io.smallrye.graphql.api.Subscription annotation. * * @return An optional containing the subscription name if specified, otherwise empty. */ - public Optional subscriptionName() { Optional subscriptionAnnotation = getMethodAnnotation(SUBCRIPTION); if (subscriptionAnnotation.isPresent() && subscriptionAnnotation.orElseThrow().value() != null) diff --git a/client/model-builder/src/test/java/io/smallrye/graphql/client/model/ClientModelBuilderTest.java b/client/model-builder/src/test/java/io/smallrye/graphql/client/model/ClientModelBuilderTest.java index cab9cee10..5b04a8a3d 100644 --- a/client/model-builder/src/test/java/io/smallrye/graphql/client/model/ClientModelBuilderTest.java +++ b/client/model-builder/src/test/java/io/smallrye/graphql/client/model/ClientModelBuilderTest.java @@ -19,6 +19,8 @@ import io.smallrye.graphql.client.typesafe.api.GraphQLClientApi; /** + * Testing query building using the client model implementation. + * * @author mskacelik */ public class ClientModelBuilderTest { @@ -197,7 +199,6 @@ void inheritedOperationsClientModelTest() throws IOException { assertNotNull(clientModels.getClientModelByConfigKey(configKey)); ClientModel clientModel = clientModels.getClientModelByConfigKey(configKey); assertEquals(3, clientModel.getOperationMap().size()); - System.err.println(clientModel.getOperationMap()); assertOperation(clientModel, new MethodKey("allStrings", new Class[0]), "query strings { strings }");