class JournalFolderResolversImpl implements JournalFolderResolvers {

    @Override
    public DataFetcher<CompletableFuture<JournalFolder>> getJournalFolderDataFetcher() {
        return environment -> {
            long folderId = getFolderId(environment);
            if (folderId <= 0) {
                return null;
            }

            DataLoader<Long, JournalFolder> dataLoader = environment.getDataLoader(JournalFolderBatchLoader.KEY);
            return dataLoader.load(folderId);
        };
    }

}