class CompanyResolversImpl implements CompanyResolvers {

    @Override
    public DataFetcher<CompletableFuture<Company>> getCompanyDataFetcher() {
        return environment -> {
            long companyId = getCompanyId(environment);
            if (companyId <= 0) {
                return null;
            }

            DataLoader<Long, Company> dataLoader = environment.getDataLoader(CompanyBatchLoader.KEY);
            return dataLoader.load(companyId);
        };
    }

}