-
- All Implemented Interfaces:
-
graphql.schema.DataFetcher
public class EntitiesDataFetcher implements DataFetcher<CompletableFuture<DataFetcherResult<List<Any>>>>
Federated _entities field data fetcher.
-
-
Constructor Summary
Constructors Constructor Description EntitiesDataFetcher(FederatedTypeResolver resolvers)
EntitiesDataFetcher(List<FederatedTypeResolver> resolvers)
-
Method Summary
Modifier and Type Method Description CompletableFuture<DataFetcherResult<List<Object>>>
get(DataFetchingEnvironment env)
Resolves entities based on the passed in representations argument. -
-
Constructor Detail
-
EntitiesDataFetcher
EntitiesDataFetcher(FederatedTypeResolver resolvers)
-
EntitiesDataFetcher
EntitiesDataFetcher(List<FederatedTypeResolver> resolvers)
-
-
Method Detail
-
get
CompletableFuture<DataFetcherResult<List<Object>>> get(DataFetchingEnvironment env)
Resolves entities based on the passed in representations argument. Entities are resolved in the same order they are specified in the list of representations. If target representation cannot be resolved, NULL will be returned instead.
Representations are grouped by the underlying typename and each batch is resolved asynchronously before merging the results back into a single list that preserves the original order.
-
-
-
-