Auto-configure DataLoaderRegistrar components
This commit configures all `DataLoaderRegistrar` application components with the `GraphQlService`. This allows applications to contribute `DataLoader` instances without using the annotated-controller programming model. Closes gh-189
This commit is contained in:
@@ -258,6 +258,10 @@ public class BookController {
|
||||
}
|
||||
----
|
||||
|
||||
`BatchLoaderRegistry` is itself a `DataLoaderRegistrar`, as it will register `DataLoader` instances for each request.
|
||||
Applications can also contribute other `DataLoaderRegistrar` instances as components - they will be configured with
|
||||
the `ExecutionGraphQlService` automatically.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -451,6 +455,7 @@ By default, `@GraphQlTest` limits scanning to the following beans:
|
||||
|
||||
- `@Controller`
|
||||
- `RuntimeWiringConfigurer`
|
||||
- `DataLoaderRegistrar`
|
||||
- `JsonComponent`
|
||||
- `Converter`
|
||||
- `GenericConverter`
|
||||
|
||||
Reference in New Issue
Block a user