Interface DataLoaderRegistrar
- All Known Subinterfaces:
BatchLoaderRegistry
- All Known Implementing Classes:
DefaultBatchLoaderRegistry
public interface DataLoaderRegistrar
Contract for access to the
DataLoaderRegistry
for each request for
the purpose of registering DataLoader
instances.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Whether the registrar has anyDataLoader
registrations to make.void
registerDataLoaders
(org.dataloader.DataLoaderRegistry registry, GraphQLContext context) Callback that provides access to theDataLoaderRegistry
from the theExecutionInput
.
-
Method Details
-
hasRegistrations
default boolean hasRegistrations()Whether the registrar has anyDataLoader
registrations to make.- Since:
- 1.2.8
-
registerDataLoaders
Callback that provides access to theDataLoaderRegistry
from the theExecutionInput
.- Parameters:
registry
- the registry to make registrations againstcontext
- the GraphQLContext from the ExecutionInput that registrars should set in theDataLoaderOptions
so that batch loaders can access it viaBatchLoaderEnvironment
.
-