Updating all properties of an object from cache.modify fields

Hi, I’ve a simple question.
Below we have a classic update of an object, but this is only updating the description and amount properties.

update: (cache) => {
        cache.modify({
          id: cache.identify(charge), 
          fields: {
            description() {
              return charge.description;
            },
            amount() {
              return charge.amount;
            },

         }

What I want is to update the whole object (not specific properties) like in spread operators. Like this…

update: (cache) => {
        cache.modify({
          id: cache.identify(charge),
          fields: {
            ...charge
          }

of course, the code above doesn’t work, that’s where I need help.

Thanks in advance

Would it be possible to use client.writeFragment instead?