Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't persist @client fields? #477

Open
amilich opened this issue Mar 28, 2023 · 3 comments
Open

Don't persist @client fields? #477

amilich opened this issue Mar 28, 2023 · 3 comments

Comments

@amilich
Copy link

amilich commented Mar 28, 2023

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/

@jingp-ofload
Copy link

same here.

@wodCZ
Copy link
Collaborator

wodCZ commented Sep 10, 2023

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.

@jingp-ofload
Copy link

Forgive my foolish here. What I meant was Persist @client field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants