Preface: I'm new to GraphQL and Amplify.
I have a user object that contains two arrays, one called preferred_genres, and another called preferred_characters. I have a profile page where the user can edit their profile and add items to these arrays.
The update mutation provided by AWS Amplify seems only to be adding elements to the array, never removing them. If on my UI I remove an item from the list and then submit the update mutation, the item is not removed from my backend. If I add an item to the array, the item is added on the backend, but I also end up with duplicate values for those already in the backend.
What I'm trying to do is overwrite the array on the backend with the data I'm submitting from the front end. Am I missing something obvious? Is there a more appropriate way of achieving this in GraphQL?
Schema
type User @model {
id: ID!
...
preferred_characters: [Character]
preferred_genres: [Genre]
...
}





