class MBThreadResolversImpl implements MBThreadResolvers {

    @Override
    public DataFetcher<MBThread> createMBThreadDataFetcher() {
        return environment -> {
            long categoryId = util.getLongArg(environment, "categoryId");
            MBMessage message = util.getMBMessageArg(environment, "message");
            ServiceContext serviceContext = new ServiceContext();

            return mbThreadLocalService.addThread(
                    categoryId,
                    message,
                    serviceContext);
        };
    }

}