Interface GraphQL.BatchLoader

Enclosing class:
GraphQL

public static interface GraphQL.BatchLoader
Resolves one field for many sources in one call -- what @BatchMapping binds, and Spring's answer to the N+1 problem: the field of every object in a list is loaded together, before any of them is completed.
  • Method Summary

    Modifier and Type
    Method
    Description
    load(List<Object> sources, DataFetchingEnvironment environment)
    The values for sources: a Map keyed by source, or a List with one value per source in the same order.