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

Doesn't update the data after a mutation if enabled is false in useQuery #1533

Open
demershov opened this issue Feb 7, 2024 · 0 comments
Open

Comments

@demershov
Copy link

Describe the bug
If the enabled option is false for the useQuery function and if you run a mutation that changes the state of one of the objects obtained using useQuery, then the apollo cache will be updated, but the object inside the component will not. But if enabled is true in useQuery then everything will work as expected, and response of mutation will update state in a component.

Expected behavior
After mutation, the returned data must replace the data received by useQuery, regardless of the state of the enabled option.

Versions
vue: [email protected]
vue-apollo: @vue/[email protected]
@apollo/client: @apollo/[email protected]

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

1 participant