Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

fix: add check for resetQueryStoreErrors in afterExecute #3599

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shomukai
Copy link

@shomukai shomukai commented Oct 15, 2019

Add a check for resetQueryStoreErrors.

The resetQueryStoreErrors function is in query's prototype, in theory it should not be undefined. But we encountered a case where resetQueryStoreErrors is undefined after some network error.
So got an error like:

TypeError: t.currentObservable.query.resetQueryStoreErrors is not a function

Still chasing what caused it.
As a quick fix, just added a check for resetQueryStoreErrors.

Please close this pull request, if not related.
Thanks.
And thanks for your time in advance.

We are using these versions:
@apollo/react-hooks 3.1.1
apollo-client 2.6.4
react-apollo 3.1.1
apollo-link 1.2.13
apollo-link-http 1.5.16
apollo-link-http-common 0.2.15
apollo-link-retry 2.2.15
apollo-utilities 1.3.2

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)
  • Make sure all of the significant new logic is covered by tests
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.

@apollo-cla
Copy link

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

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.

None yet

2 participants