Closed greskosa closed 1 month ago
No, that's not supported. The hooks are generally always only meant to monitor the "last result", so any results previous to that will be unsubscribed.
You probably need hand-written logic that dispatches endpoint.initiate()
calls.
@phryneas thanks for the quick reply. Is there any chance to update the documentation to have a more precise description of how cache clearing works for this particular case?
A PR would be very welcome.
Hello 👋
Documentation for useLazyQuery says about one of the feature:
'Subscribes' the component to keep cached data in the store, and 'unsubscribes' when the component unmounts
But there is no mention about unsubscribing when
trigger
function was called a few times with different arguments.Example:
It always makes unsubscribe and clearing of cache for previous id but I need to keep both results in the cache and clear them only on component unmount. Is there any way to control that?
Thanks for help!