-
- All Implemented Interfaces:
-
graphql.schema.DataFetcher
public class EntityResolver implements DataFetcher<CompletableFuture<DataFetcherResult<List<Any>>>>
Federated _entities query resolver.
-
-
Constructor Summary
Constructors Constructor Description EntityResolver(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
-
EntityResolver
EntityResolver(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.
-
-
-
-