class AssetVocabularyResolversImpl implements AssetVocabularyResolvers {

    @Override
    public DataFetcher<CompletableFuture<AssetVocabulary>> getAssetVocabularyDataFetcher() {
        return environment -> {
            long vocabularyId = getVocabularyId(environment);
            if (vocabularyId <= 0) {
                return null;
            }

            DataLoader<Long, AssetVocabulary> dataLoader = environment.getDataLoader(AssetVocabularyBatchLoader.KEY);
            return dataLoader.load(vocabularyId);
        };
    }

}