Skip parameter not working properly
See original GitHub issueHello @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 thevariables
-> 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:
- Created a year ago
- Reactions:6
- Comments:7 (3 by maintainers)
Top 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 >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
@Titozzz Fix incoming! #9823
@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