fix(druxt): re-hydrate included resources on getCollection cache hit - #782
fix(druxt): re-hydrate included resources on getCollection cache hit#782Decipher wants to merge 1 commit into
Conversation
addCollection dehydrated included resources into state.resources but then deleted them from the stored collection, so a second getCollection dispatch for an already-cached query returned included: undefined - silently breaking anything resolving an included resource (e.g. an image/media reference) on a cache hit.
🦋 Changeset detectedLatest commit: 24b691b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan includes up to 2 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe Druxt collection cache now preserves dehydrated ChangesCollection cache rehydration
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized fix restores included resources on cached collection reads without introducing a known user or production risk; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Types of changes
Description
addCollectiondehydratedincludedresources intostate.resourcesbut then deleted them from the stored collection. So a secondgetCollectiondispatch for an already-cached query returnedincluded: undefined, and anything resolving an included resource, such as an image or media reference, silently got nothing back on the cache hit.This keeps the dehydrated
includedrefs on the stored collection and reconstructs them on a cache hit, the same waydataalready is. Includes a changeset.Resolves: #781
Checklist
Screenshots/Media
N/A
Summary by CodeRabbit