skip option fails when assigned a variable that flips from false to true
See original GitHub issueIntended outcome:
skip: true
results in no network request.
The error
property in the result of the useQuery hook reflects the current running query.
Actual outcome:
skip: true
results in a network request.
The error
property displays for the previous result.
How to reproduce the issue:
- Go here: https://codesandbox.io/s/apolloclient-v3-skip-bug-ov1z3?file=/src/app.js
- Click the button and observe the
400
from the graphql endpoint. - Click the button again and observe the successful response but the logged error message.
Related Issues https://github.com/apollographql/apollo-client/issues/6190 https://github.com/apollographql/apollo-client/issues/6572 https://github.com/apollographql/apollo-client/issues/6507
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:19 (2 by maintainers)
Top Results From Across the Web
Easiest way to flip a boolean value? - Stack Overflow
I just want to flip a boolean based on what it already is. If it's true - make it false. If it's false...
Read more >about Preference Variables - PowerShell | Microsoft Learn
PowerShell includes a set of variables that enable you to customize its behavior. These preference variables work like the options in ...
Read more >Conditionals with if/else & Booleans | AP CSP (article)
The condition is a Boolean expression: an expression that evaluates to either true or false . Boolean values are another type of data...
Read more >Strict mode - JavaScript - MDN Web Docs
Strict mode makes assignments which would otherwise silently fail to throw an exception. There are three ways to fail a property assignment:.
Read more >Common issues and solutions - mypy 0.991 documentation
You can add a # type: ignore comment to tell mypy to ignore this error: ... and any variable whose name is passed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’re finalizing a fix for this and other
skip
related issues, and should have it ready today.i’m surprised the major release (out of beta) was done with this still broken (since it was a known thing not a bug that popped after release)… it’s a pretty widely used feature and I was a little shocked after I migrated to find the console error and this thread … would of been nice if it was a known thing to make mention of it in the release/migration guide … maybe its just me though?