You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest version of 'retry' no longer includes error #638
Not sure how I would reproduce this with the new API, since the onError expects void, retryDelay does not give an error, and retry no longer takes a function.
@tannerlinsley If I add in a ts-expect-error it compiles, but no longer works, the 'retry' function is no longer invoked in the newest version of react-query
@tannerlinsley thanks for looking into it, I resolved this by removing any reference to @types/react-query. Looks like the combination of the latest version and the old type definition were causing this.
Another potential issue I'm seeing though, with the new version, is that react-query seems to cache errored queries? so I get a 401 if my session expires, the query immediately fails without retrying, and then I sign in (the error boundary redirects me), but then it immediately re-throws the same error again
Activity
tannerlinsley commentedon Jun 26, 2020
Is this a types restriction, or have you tried this without types?
onionhammer commentedon Jun 26, 2020
@tannerlinsley If I add in a ts-expect-error it compiles, but no longer works, the 'retry' function is no longer invoked in the newest version of react-query
bugzpodder commentedon Jun 27, 2020
@onionhammer I thought it was (note queries part):
tannerlinsley commentedon Jun 27, 2020
That’s for your global config. If you are configuring at the query level, you don’t need to nest everything inside of the queries object
tannerlinsley commentedon Jun 28, 2020
I can't replicate this, so it may just be an outdated types issue. Please reopen with more info if you'd like.
onionhammer commentedon Jun 29, 2020
@tannerlinsley thanks for looking into it, I resolved this by removing any reference to @types/react-query. Looks like the combination of the latest version and the old type definition were causing this.
Another potential issue I'm seeing though, with the new version, is that react-query seems to cache errored queries? so I get a 401 if my session expires, the query immediately fails without retrying, and then I sign in (the error boundary redirects me), but then it immediately re-throws the same error again