class EmailAddressResolversImpl implements EmailAddressResolvers {

    @Override
    public DataFetcher<EmailAddress> updateEmailAddressDataFetcher() {
        return environment -> {
            long emailAddressId = util.getLongArg(environment, "emailAddressId");
            String address = util.getStringArg(environment, "address");
            long typeId = util.getLongArg(environment, "typeId");
            boolean primary = util.getBooleanArg(environment, "primary");

            return emailaddressLocalService.updateEmailAddress(
                    emailAddressId,
                    address,
                    typeId,
                    primary);
        };
    }

}