-
Hi all, I'm trying to detect when a request has timed out, or when there has been a network error, so I can navigate the user to offline mode.. I'm using react native like so:
When I turn off the internet to test, this never seems to fire.. the loading for the request never ends.. is there a better approach to this sort of thing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There's some more links with more details here: https://formidable.com/open-source/urql/docs/architecture/#the-exchanges but the gist of it is that the order of exchanges matters. Your operation enters the list of exchanges like a request would do in HTTP Middleware. Results are then passed backwards, in reverse order. This means that no result will actually be received by the |
Beta Was this translation helpful? Give feedback.
There's some more links with more details here: https://formidable.com/open-source/urql/docs/architecture/#the-exchanges
but the gist of it is that the order of exchanges matters. Your operation enters the list of exchanges like a request would do in HTTP Middleware. Results are then passed backwards, in reverse order.
This means that no result will actually be received by the
errorExchange
you added in your snippet since it's after thefetchExchange
rather than in front of it