diff --git a/bom/application/pom.xml b/bom/application/pom.xml
index f9f59ab250078..df4c57bfc3352 100644
--- a/bom/application/pom.xml
+++ b/bom/application/pom.xml
@@ -46,7 +46,7 @@
3.1.1
3.0.1
2.1.10
- 1.3.1
+ 1.3.2
2.0.1
5.2.1
3.2.1
diff --git a/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/GraphQLClientConfigurationMergerBean.java b/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/GraphQLClientConfigurationMergerBean.java
index b14d2983bc62a..20eb364655d00 100644
--- a/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/GraphQLClientConfigurationMergerBean.java
+++ b/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/GraphQLClientConfigurationMergerBean.java
@@ -13,14 +13,13 @@
* On startup, this beans takes Quarkus-specific configuration of GraphQL clients (quarkus.* properties)
* and merges this configuration with the configuration parsed by SmallRye GraphQL itself (CLIENT/mp-graphql/* properties)
*
- * The resulting merged configuration resides in the application-scoped `io.smallrye.graphql.client.GraphQLClientConfiguration`
+ * The resulting merged configuration resides in `io.smallrye.graphql.client.GraphQLClientsConfiguration`
*
* Quarkus configuration overrides SmallRye configuration where applicable.
*/
@Singleton
public class GraphQLClientConfigurationMergerBean {
- @Inject
GraphQLClientsConfiguration upstreamConfiguration;
@Inject
@@ -31,6 +30,7 @@ public class GraphQLClientConfigurationMergerBean {
@PostConstruct
void enhanceGraphQLConfiguration() {
+ upstreamConfiguration = GraphQLClientsConfiguration.getInstance();
for (Map.Entry client : quarkusConfiguration.clients.entrySet()) {
// the raw config key provided in the config, this might be a short class name,
// so translate that into the fully qualified name if applicable
@@ -43,14 +43,14 @@ void enhanceGraphQLConfiguration() {
GraphQLClientConfig quarkusConfig = client.getValue();
// if SmallRye configuration does not contain this client, simply use it
- if (!upstreamConfiguration.getClients().containsKey(configKey)) {
+ if (upstreamConfiguration.getClient(configKey) == null) {
GraphQLClientConfiguration transformed = new GraphQLClientConfiguration();
transformed.setHeaders(quarkusConfig.headers);
quarkusConfig.url.ifPresent(transformed::setUrl);
- upstreamConfiguration.getClients().put(configKey, transformed);
+ upstreamConfiguration.addClient(configKey, transformed);
} else {
// if SmallRye configuration already contains this client, override it with the Quarkus configuration
- GraphQLClientConfiguration upstreamConfig = upstreamConfiguration.getClients().get(configKey);
+ GraphQLClientConfiguration upstreamConfig = upstreamConfiguration.getClient(configKey);
quarkusConfig.url.ifPresent(upstreamConfig::setUrl);
// merge the headers
if (quarkusConfig.headers != null) {
diff --git a/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/SmallRyeGraphQLClientRecorder.java b/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/SmallRyeGraphQLClientRecorder.java
index 041c43129fd9c..a7bffb28e752a 100644
--- a/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/SmallRyeGraphQLClientRecorder.java
+++ b/extensions/smallrye-graphql-client/runtime/src/main/java/io/quarkus/smallrye/graphql/client/runtime/SmallRyeGraphQLClientRecorder.java
@@ -22,7 +22,8 @@ public Supplier typesafeClientSupplier(Class targetClassName) {
}
public void setTypesafeApiClasses(List apiClassNames) {
- GraphQLClientsConfiguration configBean = Arc.container().instance(GraphQLClientsConfiguration.class).get();
+ GraphQLClientsConfiguration.setSingleApplication(true);
+ GraphQLClientsConfiguration configBean = GraphQLClientsConfiguration.getInstance();
List> classes = apiClassNames.stream().map(className -> {
try {
return Class.forName(className, true, Thread.currentThread().getContextClassLoader());
@@ -30,7 +31,7 @@ public void setTypesafeApiClasses(List apiClassNames) {
throw new RuntimeException(e);
}
}).collect(Collectors.toList());
- configBean.apiClasses(classes, true);
+ configBean.addTypesafeClientApis(classes);
}
public RuntimeValue clientSupport(Map shortNamesToQualifiedNames) {