How exactly do you update an array in the cache after a mutation?

Hello, assume you have a mutation that updates multiple objects (of the same type), and returns the updated objects from the server in the payload of the mutation response. What is the best way to update the cache? I have been trying to iterate through the resulting list of objects and calling cache.modify but no avail (cache.modify returns false). In my case, one field is being changed on each object (‘status’).

Thanks!