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 parameter not working properly

See original GitHub issue

Hello @benjamn, here is another one for you 🤞🏻

Intended outcome:

Setting skip: true on a query should prevent its execution no matter what. Sometime variables are not available yet and we do not want to fetch the back-end without them to avoid errors.

Actual outcome:

There is a bug in a specific configuration that makes the query to the back-end, but doesn’t get the result back with skip:true

How to reproduce the issue:

Here is a link to a codesandbox. TLDR:

  • define custom fetch policies
  • be on version >= 3.6.3
  • have skip: false, but update the variables -> an invisible network request is made (invisible cause even if it succeeds you wont get the results)

Where the bug probably comes from: this new skip management.

Versions

Apollo Client 3.6.6 (bug appeared on 3.6.3, before that skip was even more bugged)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benjamncommented, Jun 14, 2022

@Titozzz Fix incoming! #9823

1reaction
Titozzzcommented, Jun 13, 2022

@hwillson I’m very sorry, the sandbox didn’t include the nextFetchPolicy. Here is one showing the issue (still reproduces with 3.6.8). https://codesandbox.io/s/apollo-client-3-6-3-skip-bug-5zbl63

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I skip parameter assignments in a function signature?
However, it is possible to destructure a function argument into an empty object, which effectively nullifies the parameter without reference. Note that if...
Read more >
noUnusedParameters how can i skip uneeded parameters
If I like to skip a parameter at all, then a single underscore may be okay, but again I would think this does...
Read more >
Discards - unassigned discardable variables - Microsoft Learn
A discard communicates intent to the compiler and others that read your code: You intended to ignore the result of an expression. You...
Read more >
How to skip parameters in a function call - MATLAB Answers
I know about using "~" to specify that a parameter is skipped. However, this only works for defining the function, not when calling...
Read more >
Functions | Kotlin Documentation
Default arguments. Function parameters can have default values, which are used when you skip the corresponding argument. This reduces the number ...
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