#arguments for queryClient.removeQueries

8 messages · Page 1 of 1 (latest)

karmic oak
#

If I have the following request and I want to stop a refetch could I write the ,following command to remove the query?
["streets",{"streetid":15},"waypoints","power",{"rain":1,"steepfactor":2}]

queryClient.removeQueries("streets", streetid, "waypoints", "power");
can I pass more than two arguments to removeQueries?
or is it just possible to pass a wildcard and power to remove old power ones?

karmic oak
#

some waypoints will change and trigger an refetch but if that is trigged all power ones should not be refetched.

#

can I check with if - if there is already a query like that to remove it?

tough timber
#

removeQueries doesn't stop refetches so I don't understand what you're trying to do

karmic oak
#

If the component is open and rendered and then a change of the waypoint happens it would trigger a refetch or? I would like to stop that refetch.

#

queryClient.removeQueries with the queryKey, it will remove the query from the cache and not re-render the components, so the query will stay rendered on the screen if its rendered. Or?

#

Easy: I want that query to not refetch if sometimes changes. Only if the component gets closed / openend again

#

Thank you very much for your help!