Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

126 apollo client retry #139

Merged
merged 8 commits into from
Feb 5, 2024
Merged

126 apollo client retry #139

merged 8 commits into from
Feb 5, 2024

Conversation

L03TJ3
Copy link
Collaborator

@L03TJ3 L03TJ3 commented Jan 31, 2024

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

Copy link
Contributor

@sirpy sirpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does it define after how many attempts it would stop?
Why is it unable to connect? do we have a mongodb issue?
This doesnt happen with subgraph?

@L03TJ3
Copy link
Collaborator Author

L03TJ3 commented Feb 1, 2024

@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

Copy link

vercel bot commented Feb 2, 2024

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
Copy link
Collaborator Author

L03TJ3 commented Feb 2, 2024

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

@L03TJ3 L03TJ3 requested a review from sirpy February 2, 2024 06:09
@sirpy
Copy link
Contributor

sirpy commented Feb 4, 2024

@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
Copy link
Collaborator Author

L03TJ3 commented Feb 5, 2024

@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

@L03TJ3 L03TJ3 merged commit 92067e1 into master Feb 5, 2024
2 checks passed
@L03TJ3 L03TJ3 deleted the 126-apollo-client-retry branch February 5, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants