class RegionResolversImpl implements RegionResolvers {

    @Override
    public DataFetcher<Region> createRegionDataFetcher() {
        return environment -> {
            long countryId = util.getLongArg(environment, "countryId");
            String regionCode = util.getStringArg(environment, "regionCode");
            String name = util.getStringArg(environment, "name");
            boolean active = util.getBooleanArg(environment, "active");

            return regionService.addRegion(
                    countryId,
                    regionCode,
                    name,
                    active);
        };
    }

}