maybe this is a stupid question… but do I have to ...
# prisma-whats-new
j
maybe this is a stupid question… but do I have to first query for a list of ids on a type, then add my id(s) to that list and update the same type with the full list of ids? Or can I just update the the existing ids by adding my own by some specific mutation syntax?
n
not quite getting the full picture here, can you elaborate?
j
I have a type Company with a field gallery which is a list if File (images) The gallery has 3 images. I want to add 2 images so there is 5 in total. I wrote an update mutation but it replaced the full gallery list with my new image list instead of concatenate old and new list. I have solved this by getting old/current gallery by query, add my images to it in client and then update the full list in mutation. My question was if there is a way to write a mutation so that I pass my new image IDs and GQL handles the ‘concatenation’ server side.