You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
Coming from jQuery I know I can use jQuery.active to check the number of active jQuery AJAX connections; I have to constantly poll that var in order to have an event fired in the advent of a new connection. I can also use jQuery.ajaxStart() and jQuery.ajaxStop() events.
Coming from
jQuery
I know I can usejQuery.active
to check the number of active jQuery AJAX connections; I have to constantly poll that var in order to have an event fired in the advent of a new connection. I can also usejQuery.ajaxStart()
andjQuery.ajaxStop()
events.Apollo Link (https://github.com/apollographql/apollo-link) is the layer which effectively starts GET/POST requests.
Is there any way to verify that requests are pending?
Here a user tried it: apollographql/apollo-link-state#236 using this code:
It works because every request passes through there, but if it were to be interrupted for any reason my status would no longer change to
false
.Also I have many parallel requests to check, so I can create a "counter" +1 / -1 for each request, but still the problem with the interrupted ones.
What do you think about?
Is there a way without libraries at all?
Is there a
fetch
API or event to subscribe?The text was updated successfully, but these errors were encountered: