class CountryResolversImpl implements CountryResolvers {

    @Override
    public DataFetcher<Country> getCountryDataFetcher() {
        return environment -> {
            long countryId = getCountryId(environment);
            if (countryId <= 0) {
                return null;
            }

            return countryService.getCountry(countryId);
        };
    }

}