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: catch errors thrown by cache when reading query result #5294

Closed
wants to merge 3 commits into from

Conversation

noahm
Copy link

@noahm noahm commented Sep 10, 2019

This fixes an issue reported in apollographql/react-apollo#3367 (also reproduced here: https://github.com/noahm/react-apollo-error-template/tree/skip-with-directive-error)

After sleuthing around a bit I found the issue was introduced by #4743 in apollo-cache@2.6.0-beta.7 as a result of removing the try-catch statement around the attempt to read from the cache. I'm not terribly familiar with the Apollo codebase, and perhaps a fix for this is better suited as a tweak in react-apollo or perhaps inside the cache layer itself, but the issue is blocking our ability to upgrade.

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes) (n/a)
  • Make sure all of the significant new logic is covered by tests

@apollo-cla
Copy link

@noahm: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@jetzhou
Copy link

jetzhou commented Sep 19, 2019

@noahm thanks for the fix! I'm running into the same problem. It would be great if we can get this merged and released as early as possible.

@jetzhou
Copy link

jetzhou commented Oct 18, 2019

Looks like a lot of PR on the repo is stuck on bundlesize check, wonder if there are any maintainers paying attention to the state of PRs and if this one will ever get merged... :(

@benjamn
Copy link
Member

benjamn commented May 26, 2021

@noahm I know it's been a while, but this behavior was improved/fixed by #7098 in @apollo/client@3.3.0. Please update if you can!

@benjamn benjamn closed this May 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants