question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

skip option fails when assigned a variable that flips from false to true

See original GitHub issue

Intended 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:

  1. Go here: https://codesandbox.io/s/apolloclient-v3-skip-bug-ov1z3?file=/src/app.js
  2. Click the button and observe the 400 from the graphql endpoint.
  3. Click the button again and observe the successful response but the logged error message.

Image from Gyazo

Versions Image from Gyazo

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:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:19 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
hwillsoncommented, Jul 31, 2020

We’re finalizing a fix for this and other skip related issues, and should have it ready today.

6reactions
cdaz5commented, Jul 23, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found