Skip to content

Commit

Permalink
SmallRye GraphQL 1.8.3, set the global vertx instance for graphql cli…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
jmartisk committed Nov 21, 2022
1 parent f914563 commit e3b5283
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<smallrye-health.version>3.3.0</smallrye-health.version>
<smallrye-metrics.version>3.0.5</smallrye-metrics.version>
<smallrye-open-api.version>2.3.1</smallrye-open-api.version>
<smallrye-graphql.version>1.8.2</smallrye-graphql.version>
<smallrye-graphql.version>1.8.3</smallrye-graphql.version>
<smallrye-opentracing.version>2.1.1</smallrye-opentracing.version>
<smallrye-fault-tolerance.version>5.6.0</smallrye-fault-tolerance.version>
<smallrye-jwt.version>3.5.4</smallrye-jwt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import io.quarkus.smallrye.graphql.client.runtime.GraphQLClientSupport;
import io.quarkus.smallrye.graphql.client.runtime.GraphQLClientsConfig;
import io.quarkus.smallrye.graphql.client.runtime.SmallRyeGraphQLClientRecorder;
import io.quarkus.vertx.core.deployment.CoreVertxBuildItem;

public class SmallRyeGraphQLClientProcessor {

Expand Down Expand Up @@ -205,4 +206,11 @@ ServiceProviderBuildItem overrideErrorMessageProvider() {
return ServiceProviderBuildItem.allProvidersFromClassPath("io.smallrye.graphql.client.impl.ErrorMessageProvider");
}

@BuildStep
@Record(RUNTIME_INIT)
void setGlobalVertxInstance(CoreVertxBuildItem vertxBuildItem,
SmallRyeGraphQLClientRecorder recorder) {
recorder.setGlobalVertxInstance(vertxBuildItem.getVertx());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import io.quarkus.runtime.annotations.Recorder;
import io.smallrye.graphql.client.impl.GraphQLClientsConfiguration;
import io.smallrye.graphql.client.typesafe.api.TypesafeGraphQLClientBuilder;
import io.smallrye.graphql.client.vertx.VertxManager;
import io.vertx.core.Vertx;

@Recorder
public class SmallRyeGraphQLClientRecorder {
Expand Down Expand Up @@ -48,4 +50,8 @@ public void initializeConfigurationMergerBean() {
merger.nothing();
}

public void setGlobalVertxInstance(Supplier<Vertx> vertx) {
VertxManager.setFromGlobal(vertx.get());
}

}
2 changes: 1 addition & 1 deletion jakarta/rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ recipeList:
newValue: 6.1.0
- org.openrewrite.maven.ChangePropertyValue:
key: smallrye-graphql.version
newValue: 2.0.0.RC12
newValue: 2.0.0.RC13
- org.openrewrite.maven.ChangePropertyValue:
key: smallrye-health.version
newValue: 4.0.0
Expand Down

0 comments on commit e3b5283

Please sign in to comment.