BatchLoaderRegistry extends DataLoaderRegistrar

Given that BatchLoaderRegistry is declared as a bean and injected into
ExecutionGraphQlService as a DataLoaderRegistrar, it makes sense to
have be a DataLoaderRegistrar vs declaring the bean as the
implementation type. A BatchLoaderRegistry is supposed to result in
DataLoader registrations so this makes sense in any case.
This commit is contained in:
Rossen Stoyanchev
2021-09-27 09:18:07 +01:00
parent 56ca50e6f3
commit 0bb8f58008
10 changed files with 15 additions and 14 deletions

View File

@@ -43,7 +43,7 @@ import org.springframework.graphql.execution.GraphQlSource;
@AutoConfigureAfter(GraphQlAutoConfiguration.class)
public class GraphQlServiceAutoConfiguration {
private final DefaultBatchLoaderRegistry batchLoaderRegistry = new DefaultBatchLoaderRegistry();
private final BatchLoaderRegistry batchLoaderRegistry = new DefaultBatchLoaderRegistry();
@Bean
public BatchLoaderRegistry batchLoaderRegistry() {