class JournalFeedResolversImpl implements JournalFeedResolvers {

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

            DataLoader<Long, JournalFeed> dataLoader = environment.getDataLoader(JournalFeedBatchLoader.KEY);
            return dataLoader.load(id);
        };
    }

}