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

(react) - Fetching state is not turning to 'true' while reexecuting a query #2299

Closed
lajos-vlasics opened this issue Feb 23, 2022 · 0 comments · Fixed by #2308
Closed

(react) - Fetching state is not turning to 'true' while reexecuting a query #2299

lajos-vlasics opened this issue Feb 23, 2022 · 0 comments · Fixed by #2308
Labels
bug 🐛 Oh no! A bug or unintented behaviour.

Comments

@lajos-vlasics
Copy link

In our react app we updated urql to 2.0.10. We found out that the fetching state is not turning to true while reexecuting a query.

urql version & exchanges:
higher than 2.0.6

Steps to reproduce

  1. Create a React useQuery hook (doesn't matter if it is paused or not).
  2. Call the reexecuteQuery function (in 'network-only' mode) returned from the useQuery hook.

Expected behavior
The fetching state (in the result from the useQuery ) turns to true while calling the reexecuteQuery, than to false after the query is finished.

Actual behavior
The fetching state filps to true only the first time we calling the query, but never again, it remains false.

https://codesandbox.io/s/urql-reexecute-query-fetching-state-issue-egw2et?file=/src/Foo.jsx

@lajos-vlasics lajos-vlasics added the bug 🐛 Oh no! A bug or unintented behaviour. label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Oh no! A bug or unintented behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant