-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Refetch no longer works in 3.5 when skip is true #9101
Comments
Sorry to hear the behavior changed in an unexpected way. So the ask is, allow |
Thanks for getting back to me so quickly. I'm not averse to updating my code to what the correct way to do it is (I assume |
You may have found it in this comment? apollographql/react-apollo#3499 (comment) |
Is this expected or it's going to be reverted? |
@sebastiansanio We’ll re-enable this “use-case!” |
My experience using |
I have the same bug as reported by @patrickconroy. Setting |
I got a very funny story for you guys. There’s another issue which says that calling Do you guys wish to debate which behavior is “expected”? Because I am more or less disinterested on this issue. I’m leaning towards reverting to the old behavior because that would make a bunch of |
@brainkim I'm leaning toward |
In any case dont we consider this a breaking change? If so this is not according to semver IMHO. |
My opinion is that |
I faced with the same issue after updating to the I use
|
+1 I was working with |
+1 refetch should always trigger a network call. |
I’ve thought about this for a while over the holidays and I think that I shouldn’t have to conditionally call Since moving from 3.4 to 3.5 this was a breaking change, the default should be reverted and a new Although I’ll ask: if a user explicitly makes |
Just wanted to pop in and say "thanks" for this fix! I have been struggling to upgrade an v2 app to v3 over the last week. What a difference a day can make, eh? |
Hello. I've been using
refetch
fromuseQuery
for over a year. In my code, I use it in combination withskip: true
to fetch queries lazily. Starting from 3.5 (worked in 3.4), I can no longer do that. My browser doesn't run the query as expected with the following code:Intended outcome:
A network request would be made for the query, and
response
would include the results of that.Actual outcome:
No query is made and
response
is undefined.How to reproduce the issue:
Code above.
I'm assuming this might have to do with
skip: true
, but again this worked < 3.5.Versions
System:
OS: macOS 11.6
Binaries:
Node: 17.0.1 - /usr/local/bin/node
npm: 8.1.0 - /usr/local/bin/npm
Browsers:
Chrome: 95.0.4638.69
Safari: 15.1
npmPackages:
@apollo/client: ^3.3.21 => 3.5.4
The text was updated successfully, but these errors were encountered: