Update GraphQL QBE auto-config
This change is the same as 68806bfef8
for Querydsl, but applied also to the Query By Example auto config.
Closes gh-29445
			
			
This commit is contained in:
		
							parent
							
								
									e23aaba32b
								
							
						
					
					
						commit
						68f4938367
					
				|  | @ -1,5 +1,5 @@ | |||
| /* | ||||
|  * Copyright 2002-2021 the original author or authors. | ||||
|  * Copyright 2002-2022 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  | @ -16,7 +16,6 @@ | |||
| 
 | ||||
| package org.springframework.boot.autoconfigure.graphql.data; | ||||
| 
 | ||||
| import java.util.Collections; | ||||
| import java.util.List; | ||||
| import java.util.stream.Collectors; | ||||
| 
 | ||||
|  | @ -44,7 +43,7 @@ import org.springframework.graphql.execution.GraphQlSource; | |||
|  * | ||||
|  * @author Rossen Stoyanchev | ||||
|  * @since 2.7.0 | ||||
|  * @see QueryByExampleDataFetcher#autoRegistrationTypeVisitor(List, List) | ||||
|  * @see QueryByExampleDataFetcher#autoRegistrationConfigurer(List, List) | ||||
|  */ | ||||
| @Configuration(proxyBeanMethods = false) | ||||
| @ConditionalOnClass({ GraphQL.class, QueryByExampleDataFetcher.class, QueryByExampleExecutor.class }) | ||||
|  | @ -62,8 +61,8 @@ public class GraphQlQueryByExampleAutoConfiguration { | |||
| 			List<ReactiveQueryByExampleExecutor<?>> reactiveExecutors = reactiveExecutorsProvider.stream() | ||||
| 					.collect(Collectors.toList()); | ||||
| 			if (!executors.isEmpty()) { | ||||
| 				builder.typeVisitors(Collections.singletonList( | ||||
| 						QueryByExampleDataFetcher.autoRegistrationTypeVisitor(executors, reactiveExecutors))); | ||||
| 				builder.configureRuntimeWiring( | ||||
| 						QueryByExampleDataFetcher.autoRegistrationConfigurer(executors, reactiveExecutors)); | ||||
| 			} | ||||
| 		}; | ||||
| 	} | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| /* | ||||
|  * Copyright 2002-2021 the original author or authors. | ||||
|  * Copyright 2002-2022 the original author or authors. | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
|  | @ -43,7 +43,7 @@ import org.springframework.graphql.execution.GraphQlSource; | |||
|  * | ||||
|  * @author Rossen Stoyanchev | ||||
|  * @since 2.7.0 | ||||
|  * @see QueryByExampleDataFetcher#autoRegistrationTypeVisitor(List, List) | ||||
|  * @see QueryByExampleDataFetcher#autoRegistrationConfigurer(List, List) | ||||
|  */ | ||||
| @Configuration(proxyBeanMethods = false) | ||||
| @ConditionalOnClass({ GraphQL.class, QueryByExampleDataFetcher.class, ReactiveQueryByExampleExecutor.class }) | ||||
|  | @ -58,8 +58,8 @@ public class GraphQlReactiveQueryByExampleAutoConfiguration { | |||
| 		return (builder) -> { | ||||
| 			List<ReactiveQueryByExampleExecutor<?>> executors = executorsProvider.stream().collect(Collectors.toList()); | ||||
| 			if (!executors.isEmpty()) { | ||||
| 				builder.typeVisitors(Collections.singletonList( | ||||
| 						QueryByExampleDataFetcher.autoRegistrationTypeVisitor(Collections.emptyList(), executors))); | ||||
| 				builder.configureRuntimeWiring( | ||||
| 						QueryByExampleDataFetcher.autoRegistrationConfigurer(Collections.emptyList(), executors)); | ||||
| 			} | ||||
| 		}; | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue