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

fix(web): infinite loop on network error #525

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

KaWaite
Copy link
Member

@KaWaite KaWaite commented Jun 26, 2023

Overview

An infinite loop would happen on an Apollo Client networking error. Turns out this was due to using Jotai state inside our GQL provider for the error message to be shown in our Notification component.

What I've done

  • Fixed the infinite loop

What I haven't done

  • We lose user-facing error messages for GQL (both networking errors and gql errors, which includes policy errors). This PR doesn't include adding error handling directly in the components whose query/mutation can cause these sorts of errors.

How I tested

Which point I want you to review particularly

Memo

Later need to create an error handling policy around GQL and implement it on each query/mutation

@netlify
Copy link

netlify bot commented Jun 26, 2023

Deploy Preview for reearth-web ready!

Name Link
🔨 Latest commit 133f8bb
🔍 Latest deploy log https://app.netlify.com/sites/reearth-web/deploys/649b93fd0a749d000821f414
😎 Deploy Preview https://deploy-preview-525--reearth-web.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@KaWaite KaWaite requested a review from rot1024 June 26, 2023 13:02
@github-actions github-actions bot added the web label Jun 26, 2023
@github-actions github-actions bot requested a review from pyshx June 26, 2023 13:02
@KaWaite KaWaite self-assigned this Jun 26, 2023
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #525 (133f8bb) into main (05e32d1) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #525      +/-   ##
==========================================
- Coverage   26.69%   26.69%   -0.01%     
==========================================
  Files        1337     1337              
  Lines      144438   144435       -3     
  Branches     3481     3481              
==========================================
- Hits        38560    38559       -1     
+ Misses     104756   104754       -2     
  Partials     1122     1122              
Flag Coverage Δ
web 24.03% <ø> (-0.01%) ⬇️
web-beta 24.03% <ø> (-0.01%) ⬇️
web-classic 24.03% <ø> (-0.01%) ⬇️
web-utils 24.03% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
web/src/services/gql/provider.tsx 15.38% <ø> (-0.41%) ⬇️

@KaWaite KaWaite merged commit fa30bc5 into main Jun 28, 2023
@KaWaite KaWaite deleted the fix-infinite-loop-on-network-error branch June 28, 2023 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants