class JournalFolderResolversImpl implements JournalFolderResolvers {

    @Override
    public DataFetcher<JournalFolder> createJournalFolderDataFetcher() {
        return environment -> {
            long userId = util.getLongArg(environment, "userId", util.getDefaultUserId());
            long groupId = util.getLongArg(environment, "groupId");
            long parentFolderId = util.getLongArg(environment, "parentFolderId", JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID);
            String name = util.getStringArg(environment, "name");
            String description = util.getStringArg(environment, "description");
            ServiceContext serviceContext = new ServiceContext();

            return journalFolderLocalService.addFolder(
                    userId,
                    groupId,
                    parentFolderId,
                    name,
                    description,
                    serviceContext);
        };
    }

}