ssr: false
queries are being executed on the server
#3130
Comments
The "max processing time of around 5s" part is incorrect, it was something else. |
Thanks for reporting this @patroza. Unfortunately I haven't been able to re-create this (and #3197 shows that SSR disabling is working). I'll close this for now, but if there's any chance you can fire over a small runnable reproduction that shows this happening, I'll happily dig in further. Thanks again! |
hi @hwillson we are definitely running into this issue. On the server I will still see Can we try somehow the latest bits soon? e.g the tests are based on an unreleased I will try to see if I can come up with some kind of repro, but as always it's of course a complex project and setup.. |
I have had success by treating Basically in the current release version, inside QueryData.execute: I see that the current code is already different, but similar change should be applied. There are probably more affected places, so imo: so in short, right now I think On some level one might say; wow that's actually a great feature; you can eat your cake and still have it. |
Thanks very much for the extra details @patroza - we'll get this fixed. |
@patroza Are you still seeing this happen with the latest |
@hwillson it looks like it's resolved, at least the client is doing the request, as the data is not coming in on the server side cache state anymore. |
@patroza Great to hear, thanks! |
Sorry to revive this thread, but I seem to be experiencing the same behavior on the latest version of Apollo (3.0.0). I am using For what it's worth, here are the rest of my apollo-related package versions:
My SSR ApolloClient:
|
@Pikachews any chance you can provide a small runnable reproduction that shows this issue? |
Sorry, didn't get a chance to create a repro, but it seems to be fixed with 3.0.1. |
Hm, my mistake. It stopped due to a misconfiguration on my side. After fixing it, it still seems to be happening 😅 I'll try to get a repro up soon. |
@hwillson I am actually seeing this issue 3.0.1, the query gets executed, but the response does not get put into the cache (since SSR is false l presume), then it executes again on the client. This is doubling all of our queries that have |
@hwillson interestingly if l use the So the short version is, |
@hwillson any chance we can get this re-opened? |
@OllieJennings🤞#3435 should help with this. |
Ahh amazing @hwillson, when can we expect the latest version bump with this in? |
@OllieJennings I've been holding off on publishing 3.1.0 until we have a clear answer for #3338. It looks like we might be okay there after all, and the remaining issues can be addressed (if necessary) in a point release. I'll finalize a few other small changes, and get 3.1.0 out this morning. |
@hwillson awesome, thanks a lot again. Will test the release tonight and report back |
Can confirm all is working @hwillson |
am I the only one who is still getting this issue? I'm using the latest version of
Also in my case along with updating to latest apollo, all subscriptions are being sent to the server which is weird. I temporarily solved this by using mock link which completes request without response if it's subscription. UPD: Figured it out. It seems that after I call
undefined which is why query get executed again. I should reuse result from getMarkupFromTree result.
|
By looking at the code and reviewing the metrics on my application i know this was not fixed, created a PR on #3515 which fixes this. |
We encountered this issue with our Apollo v3.0.1 + Next.js v7.0.2 app. We primarily use the FWIW, we tried upgrading to 3.1.1 but encountered issues with the upgrade, all queries were being sent to the client in a |
@hwillson i've encounter this issue again. I have the following <component> useQuery(...{ ssr: true })
<nested /> useQuery(...{ ssr: false })
</component> The |
@hwillson just a thought? l using the |
Moving this here from the RA 3 PR thread: #2892 (comment)
cc @patroza
In latest (and previous) beta, it seems
ssr: false
queries are executed on server anyway, and appear to have a max processing time of around 5s, is that a new feature?The text was updated successfully, but these errors were encountered: