Building reply count field

Basically you would want to run a query and search for that parent ID so something like strapi.query('comment').count({ 'parent_comment': 1 }) which would give you a count that you can pass into strapi.query('comment').update({ id: 1 }, { count: whatever })

1 Like