System Information
- Strapi Version: 4.1.6
- Operating System: macbook pro m1
- Database: sqlite
- Node Version: 14.18.3
- NPM Version: 6.14.15
- Yarn Version: 1.22.10
Problem/goal
I have a many-to-many relationship, and would like to add an entry on an update mutation without overwriting all previous records
Example mutation
mutation addField($foo:ID!, $bar:ID!) {
updateEntry(id: $foo, data: { property: [$bar] }) {
data {
...entrydata
}
}
}
Result I get
data {
...singleEntry
}
Desired result if running multiple times with different values for $bar
data {
...entry1
...entry2
...entry3
...entry4
}
Is anyone able to help me with this? Please let me know if I should add more detail to solve this problem.
Thanks