class ListTypeResolversImpl implements ListTypeResolvers {

    @Override
    public DataFetcher<CompletableFuture<ListType>> getListTypeDataFetcher() {
        return environment -> {
            long listTypeId = getListTypeId(environment);
            if (listTypeId <= 0) {
                return null;
            }

            DataLoader<Long, ListType> dataLoader = environment.getDataLoader(ListTypeBatchLoader.KEY);
            return dataLoader.load(listTypeId);
        };
    }

}