Repository navigation
feat(query-core)!: use the last applied gcTime - #12765
Conversation
A query or mutation kept the longest `gcTime` it had seen. A long value could not be shortened, and `Infinity` stayed forever. `updateGcTime` now takes the value from the latest options, like the other query-level options. The devtools passed `gcTime: -1` for "Trigger Loading". The old rule ignored that value. With the new rule it would become the active `gcTime`, so the devtools no longer pass it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: ca1659c The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
View your CI Pipeline Execution ↗ for commit ca1659c
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview23 package(s) bumped directly, 2 bumped as dependents. 🟥 Major bumps
|
size-limit report 📦
|
🎯 Changes
A query or mutation keeps the longest
gcTimeit has seen. A long value cannot be shortened, andInfinitystays forever. With this PR, thegcTimefrom the options that were applied last wins, like the other query-level options. See the v6 roadmap comment. This is the alternative to #12680.Removable.updateGcTimetakes the value from the latest options and no longer keeps the maximum.query.gcTimeandmutation.gcTimestay.gcTime: -1for "Trigger Loading". The old rule ignored that value. With the new rule it would become the activegcTime.Options without a
gcTimeset it back to the default of five minutes. So aqueryClient.query()call withoutgcTimereplaces thegcTimeof a mounted observer until that observer renders again. This PR leaves that as it is. Use the samegcTimewherever a query is used, for example with sharedqueryOptions.Verification:
test:libpasses for all 26 packages.test:typesandtest:oxlintpass forquery-coreandquery-devtools. The fullpnpm run test:prwas not run locally.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
🤖 Generated with Claude Code