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

How to use field policies / local only fields #1567

Open
rnenjoy opened this issue Aug 9, 2024 · 1 comment
Open

How to use field policies / local only fields #1567

rnenjoy opened this issue Aug 9, 2024 · 1 comment

Comments

@rnenjoy
Copy link

rnenjoy commented Aug 9, 2024

Describe the bug
Is it possible to use field policies / local only fields with vue-apollo?

https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/

Versions
vue:
vue-apollo:
@apollo/client:

Additional context
Add any other context about the problem here.

@nickmessing
Copy link
Member

@rnenjoy it works exactly as in react, you add fields decorated as @client and resolve them on the client-side cache implementation.

However, I would recommend you keep the queries as-is and use vue's computed to calculate extra data as using @client doesn't allow for any type-generation. If you're not using typescript - it's fine.

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

2 participants