As per the title, I have looked at the documents which states:
disposable: Object containing a dispose function. Calling disposable.dispose() will cancel the refetch request.
But I cannot seem to get the request to cancel. In my use case, I have a date picker which you can toggle next/prev. When click next multiple times, it will send out multiple network requests instead of cancelling the previous request.
I use an effect hook and return the dispose callback and using console log I can see the component unmounts so it should be getting called.
I also tried calling dispose immedietly. refetch({}).dispose() and that didn't work either.
As per the title, I have looked at the documents which states:
disposable: Object containing a dispose function. Calling disposable.dispose() will cancel the refetch request.
But I cannot seem to get the request to cancel. In my use case, I have a date picker which you can toggle next/prev. When click next multiple times, it will send out multiple network requests instead of cancelling the previous request.
I use an effect hook and return the dispose callback and using console log I can see the component unmounts so it should be getting called.
I also tried calling dispose immedietly.
refetch({}).dispose()
and that didn't work either.I am using Relay 15.
Any pointers please?