feat(hydration): dehydrate.serialize and hydrate.deserialize#7615
Merged
TkDodo merged 15 commits intoTanStack:mainfrom Jun 29, 2024
juliusmarminge:fix-transform-prefetched
Merged
feat(hydration): dehydrate.serialize and hydrate.deserialize#7615TkDodo merged 15 commits intoTanStack:mainfrom juliusmarminge:fix-transform-prefetched
dehydrate.serialize and hydrate.deserialize#7615TkDodo merged 15 commits intoTanStack:mainfrom
juliusmarminge:fix-transform-prefetched
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit eb19eab. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit eb19eab:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7615 +/- ##
===========================================
+ Coverage 43.98% 62.47% +18.49%
===========================================
Files 185 125 -60
Lines 7043 4504 -2539
Branches 1544 1248 -296
===========================================
- Hits 3098 2814 -284
+ Misses 3579 1459 -2120
+ Partials 366 231 -135 |
KATT
reviewed
Jun 24, 2024
HydrateOptions.transformData to restore resolved prefetchesdehydrate.serialize and hydrate.deserialize
TkDodo
approved these changes
Jun 28, 2024
juliusmarminge
commented
Jun 28, 2024
This was referenced Jul 21, 2024
This was referenced Aug 2, 2024
Closed
Closed
Merged
This was referenced Aug 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Given that the feature is brand new and there were likely not many people using it, combined with it not really working to begin with, we have decided to make a breaking change and replace
transformPromisewithserialize/deserialize.When a query gets resolved on the server before we dehydrate, the dehydrated query will contain the serialized data, but the
transformPromisefunction will never run to deserialize it, leading to serialized data being put in the query cache:You can simulate the failing behavior like this:
To solve this, I've (as discussed) replaced the
transformPromiseoption withtransformDataand added the transformation step to the other necessary places as well