You can customize how a particular field in your Apollo Client cache is read and written. To do so, you define a field policy for the field. A field policy can include:
readfunction that specifies what happens when the field's cached value is read
mergefunction that specifies what happens when field's cached value is written
- An array of key arguments that help the cache avoid storing unnecessary duplicate data.
Please read the "Customizing the behavior of cached fields" chapter on Apollo Client documentation.