GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

126 apollo client retry #139

Closed L03TJ3 closed 5 months ago

L03TJ3 commented 5 months ago

Description

When apollo client fails to connect it keeps retrying infinitely. this adds error handling to the flow and it stops after a couple of attempts.

I tried using RetryLink but this did not seem to stop the retry attempts

About # (link your issue here)

126

Reproduce steps

  1. start on local on default vite port
  2. navigate to ViewCollectives page
  3. see console for contineous requests
L03TJ3 commented 5 months ago

@sirpy The only way I found to be the retry events to configurable was by implementing RetryLink but as stated, I tried following the docs and didn't have any effect.

I just noticed this behavior because of the 'blocked-origin' when running on localhost what I mentioned in tech-sync this week

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
good-collective ❌ Failed (Inspect) Feb 2, 2024 6:14am
L03TJ3 commented 5 months ago

@sirpy not sure about subgraph as I didn't see it happen, but added the errorLink nonetheless. it could happen

sirpy commented 5 months ago

@L03TJ3

  1. please provide more details of the issue. logs, how to reproduce. When I do X I get Y but I expected Z.
  2. I don't see how this solves anything, it only logs the errors, no retry no anything.
L03TJ3 commented 5 months ago

@sirpy

  1. added reproduce steps
  2. I thought it was a general issue, but after re-checking it only seems to happen to have a continuous cycle when the error is caused by a forbidden domain. If you block the URL it does stop after X attempts (was not able to figure out where this defined by default).
  3. As stated. I tried adding the RetryLink for the above issue, it did not seem to have any noticeable effect. I have retried this now, and it works so apparently did something wrong the first time I tried it (added a new commit)

I just noticed extensive network requests caused by unreachable domain, and my expectation is that this is handled more gracefully than not at all