ccmbioinfo / osmp

One-Sided Matching Portal
6 stars 1 forks source link

React Apollo: Use non-subscription approach for remote node error link #283

Closed frewmack closed 2 years ago

frewmack commented 2 years ago

Closes #103 (partially)

Definitely need someone with more experience with Apollo to validate this.

My understanding of the issue is that previously, remoteNodeErrorLink used a subscription (ie. a WebSocket connection) to check for gql errors. This link was suppressing network errors for some reason, causing failed gql requests to hang until the timeout link triggered. I've changed this to a link that does not use subscriptions and it appears to work fine.

I'll create a new issue for redirecting to login on 403. Login redirects should happen automatically, so I will update this PR to include a prompt to refresh the page.

jennyziyi-xu commented 2 years ago

Verified that network error 404 pops up immediately whereas on the develop branch, it will hang until timeout.