Is there an entity or query API for adding 1 entry for many to many relations?

[details=“System Information”]

  • Strapi Version: 4.5.1
  • Operating System: mac os
  • Database: mysql
  • Node Version: 16.17.1
  • NPM Version: 8.15.0
  • Yarn Version: 1.22.19

In many to many relations,
you have to update one of them with all list of IDs only to add 1 more to the relation.

i.e.
Books <> Authors

let’s say book B have 1000 authors linked to it already and you want to add another author to book B
you’d have to run some code such as

update book B with authors: [1,2,3,4… (all ids) 999, 1000, 1001(new one)]

is there a better way doing it such as

Add book B author ID 1001
using strapi’s entity or query api?

I think just running plain mysql query would be much easy since you will just really add one record for the relationship.

I think it would be much useful to have that in entity API.

Thanks