apollo-cache-persist
apollo-cache-persist copied to clipboard
Don't persist @client fields?
Is it possible to not persist local-only fields (@client
) in the persisted cache?
See more: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
same here.
Hello!
I believe we don't have any specific support for local-only fields. Does the result of your field's policy read()
function get persisted?
There was a custom Persistence Mapper example that modfied the cache behaviour based on query directives. You could take inspiration from there.
I could have a look if you provide a minimal reproduction.
Forgive my foolish here. What I meant was Persist @client field.