Describe the bug
I broke it in this PR: #10444
dataUpdatedAt for !hasData defaults to 0. Previously when hydrating a streamed query that had time to resolve before the time of hydration (that is, pending at dehydration, success at hydration), we still called query.fetch just to set up a retryer. This part was not necessary, but removing it also means we no longer update the dataUpdatedAt to a correct value, so it stays 0.
The hydration path needs to set this when the query was successful. Since we don't know the time it resolved on the server, we should fallback to Date.now() which is what the fetch was doing before.
We should also verify that no other values are faulty after the query.fetch removal.
I plan to fix this asap.
(Update: I haven't verified all details a 100% yet, but I'm pretty confident this was the mechanism that broke it)
Your minimal, reproducible example
N/A
Steps to reproduce
N/A
Expected behavior
dataUpdatedAt should get set.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
N/A
Tanstack Query adapter
None
TanStack Query version
5.100.1
TypeScript version
No response
Additional context
No response
Describe the bug
I broke it in this PR: #10444
dataUpdatedAtfor!hasDatadefaults to 0. Previously when hydrating a streamed query that had time to resolve before the time of hydration (that is, pending at dehydration, success at hydration), we still calledquery.fetchjust to set up a retryer. This part was not necessary, but removing it also means we no longer update thedataUpdatedAtto a correct value, so it stays 0.The hydration path needs to set this when the query was successful. Since we don't know the time it resolved on the server, we should fallback to
Date.now()which is what thefetchwas doing before.We should also verify that no other values are faulty after the
query.fetchremoval.I plan to fix this asap.
(Update: I haven't verified all details a 100% yet, but I'm pretty confident this was the mechanism that broke it)
Your minimal, reproducible example
N/A
Steps to reproduce
N/A
Expected behavior
dataUpdatedAtshould get set.How often does this bug happen?
None
Screenshots or Videos
No response
Platform
N/A
Tanstack Query adapter
None
TanStack Query version
5.100.1
TypeScript version
No response
Additional context
No response