class MBCategoryResolversImpl implements MBCategoryResolvers {

    @Override
    public DataFetcher<MBCategory> createMBCategoryDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            long parentCategoryId = util.getLongArg(environment, "parentCategoryId");
            String name = util.getStringArg(environment, "name");
            String description = util.getStringArg(environment, "description");
            ServiceContext serviceContext = new ServiceContext();

            return mbCategoryLocalService.addCategory(
                    userId,
                    parentCategoryId,
                    name,
                    description,
                    serviceContext);
        };
    }

}