apollo icon indicating copy to clipboard operation
apollo copied to clipboard

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

Open demershov opened this issue 1 year ago • 0 comments

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]

demershov avatar Feb 07 '24 09:02 demershov