Skip to content

Commit

Permalink
Fixed dependencies, removed Sys. println
Browse files Browse the repository at this point in the history
  • Loading branch information
mskacelik authored and jmartisk committed May 13, 2024
1 parent c7b5f6a commit 86615a0
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
6 changes: 0 additions & 6 deletions client/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,12 @@
<artifactId>microprofile-config-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client-model</artifactId>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
Expand Down
7 changes: 6 additions & 1 deletion client/implementation-vertx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client-model-builder</artifactId>
<artifactId>smallrye-graphql-client-model</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.config</groupId>
Expand Down Expand Up @@ -50,5 +50,10 @@
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client-model-builder</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 4 additions & 0 deletions client/implementation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client-model</artifactId> <!--Method Key-->
</dependency>

<!-- logging and i18n -->
<dependency>
Expand Down
10 changes: 6 additions & 4 deletions client/model-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<artifactId>jboss-logging</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client-api</artifactId>
Expand All @@ -38,16 +39,17 @@
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-client</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-graphql-api</artifactId>
<scope>test</scope> <!--subscription annotation-->
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -224,11 +223,10 @@ public Optional<String> 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<String> subscriptionName() {
Optional<AnnotationInstance> subscriptionAnnotation = getMethodAnnotation(SUBCRIPTION);
if (subscriptionAnnotation.isPresent() && subscriptionAnnotation.orElseThrow().value() != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 }");
Expand Down

0 comments on commit 86615a0

Please sign in to comment.