apollo icon indicating copy to clipboard operation
apollo copied to clipboard

unable to remove previous payload while refetching query.

Open nabeelmehmood123 opened this issue 3 years ago • 1 comments

There is an advanced filter on the website, and we must only transfer the data to the variables object that the user has chosen. We must remove the data from the variables object if the user deselects the filter, however, I'm having trouble doing it at the moment.

To Reproduce Select All Activities along with "nabeel" keyword refetch({ "status":"All", "search":"nabeel" })

Need to reset filter

refetch({})

Expected behavior Actually, I want to pass an empty object when the user resets the filter but somehow refetch get the previous payload. I've passed "no-cache" policy as well. But it doesn't work.

Versions vue: 3.2.13 vue-apollo: 4.0.0-alpha.18 @apollo/client: 3.6.9

nabeelmehmood123 avatar Jul 26 '22 15:07 nabeelmehmood123

Trying to specify the properties inside that variables object ? refetch({ "status":" ", "search":" " })

ghost avatar Sep 16 '22 02:09 ghost