Skip to content

Commit 68f4938

Browse files
rstoyanchevbclozel
authored andcommitted
Update GraphQL QBE auto-config
This change is the same as 68806bf for Querydsl, but applied also to the Query By Example auto config. Closes gh-29445
1 parent e23aaba commit 68f4938

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlQueryByExampleAutoConfiguration.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
1616

1717
package org.springframework.boot.autoconfigure.graphql.data;
1818

19-
import java.util.Collections;
2019
import java.util.List;
2120
import java.util.stream.Collectors;
2221

@@ -44,7 +43,7 @@
4443
*
4544
* @author Rossen Stoyanchev
4645
* @since 2.7.0
47-
* @see QueryByExampleDataFetcher#autoRegistrationTypeVisitor(List, List)
46+
* @see QueryByExampleDataFetcher#autoRegistrationConfigurer(List, List)
4847
*/
4948
@Configuration(proxyBeanMethods = false)
5049
@ConditionalOnClass({ GraphQL.class, QueryByExampleDataFetcher.class, QueryByExampleExecutor.class })
@@ -62,8 +61,8 @@ public GraphQlSourceBuilderCustomizer queryByExampleRegistrar(
6261
List<ReactiveQueryByExampleExecutor<?>> reactiveExecutors = reactiveExecutorsProvider.stream()
6362
.collect(Collectors.toList());
6463
if (!executors.isEmpty()) {
65-
builder.typeVisitors(Collections.singletonList(
66-
QueryByExampleDataFetcher.autoRegistrationTypeVisitor(executors, reactiveExecutors)));
64+
builder.configureRuntimeWiring(
65+
QueryByExampleDataFetcher.autoRegistrationConfigurer(executors, reactiveExecutors));
6766
}
6867
};
6968
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/graphql/data/GraphQlReactiveQueryByExampleAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,7 +43,7 @@
4343
*
4444
* @author Rossen Stoyanchev
4545
* @since 2.7.0
46-
* @see QueryByExampleDataFetcher#autoRegistrationTypeVisitor(List, List)
46+
* @see QueryByExampleDataFetcher#autoRegistrationConfigurer(List, List)
4747
*/
4848
@Configuration(proxyBeanMethods = false)
4949
@ConditionalOnClass({ GraphQL.class, QueryByExampleDataFetcher.class, ReactiveQueryByExampleExecutor.class })
@@ -58,8 +58,8 @@ public GraphQlSourceBuilderCustomizer reactiveQueryByExampleRegistrar(
5858
return (builder) -> {
5959
List<ReactiveQueryByExampleExecutor<?>> executors = executorsProvider.stream().collect(Collectors.toList());
6060
if (!executors.isEmpty()) {
61-
builder.typeVisitors(Collections.singletonList(
62-
QueryByExampleDataFetcher.autoRegistrationTypeVisitor(Collections.emptyList(), executors)));
61+
builder.configureRuntimeWiring(
62+
QueryByExampleDataFetcher.autoRegistrationConfigurer(Collections.emptyList(), executors));
6363
}
6464
};
6565
}

0 commit comments

Comments
 (0)