class RatingsEntryResolversImpl implements RatingsEntryResolvers {

    @Override
    public DataFetcher<CompletableFuture<RatingsEntry>> getRatingsEntryDataFetcher() {
        return environment -> {
            long entryId = util.getLongArg(environment, "entryId");
            if (entryId <= 0) {
                return null;
            }

            DataLoader<Long, RatingsEntry> dataLoader = environment.getDataLoader(RatingsEntryBatchLoader.KEY);
            return dataLoader.load(entryId);
        };
    }

}