class WebsiteResolversImpl implements WebsiteResolvers {

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

            DataLoader<Long, Website> dataLoader = environment.getDataLoader(WebsiteBatchLoader.KEY);
            return dataLoader.load(websiteId);
        };
    }

}