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 Type
    Method
    Description
    default boolean
    Whether the registrar has any DataLoader registrations to make.
    void
    registerDataLoaders(org.dataloader.DataLoaderRegistry registry, GraphQLContext context)
    Callback that provides access to the DataLoaderRegistry from the the ExecutionInput.
  • Method Details

    • hasRegistrations

      default boolean hasRegistrations()
      Whether the registrar has any DataLoader registrations to make.
      Since:
      1.2.8
    • registerDataLoaders

      void registerDataLoaders(org.dataloader.DataLoaderRegistry registry, GraphQLContext context)
      Callback that provides access to the DataLoaderRegistry from the the ExecutionInput.
      Parameters:
      registry - the registry to make registrations against
      context - the GraphQLContext from the ExecutionInput that registrars should set in the DataLoaderOptions so that batch loaders can access it via BatchLoaderEnvironment.