fix(solid-query): fetch queries on status-only reads#10769
fix(solid-query): fetch queries on status-only reads#10769raashish1601 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughReading status or resource-related properties (e.g., ChangesStatus-Triggered Resource Initialization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/solid-query/src/useBaseQuery.ts`:
- Around line 102-124: resourceTrackingProps currently omits the query fields
that should trigger subscription/fetch (so reading them won’t call queryResource
via the Proxy): update the Set resourceTrackingProps to include 'error',
'failureReason', 'refetch', and 'promise' so the Proxy's has-check
(resourceTrackingProps.has(prop)) and the queryResource() call will run when
those properties are read; locate the Set declaration named
resourceTrackingProps and add those four PropertyKey strings to it to restore
mount-time subscription/fetch behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4cc9a6de-4e46-4d17-a1ab-29947986f752
📒 Files selected for processing (3)
.changeset/solid-query-status-resource.mdpackages/solid-query/src/__tests__/useQuery.test.tsxpackages/solid-query/src/useBaseQuery.ts
Fixes #10751
Summary
error,failureReason,refetch, andpromisereads from eagerly touching the resource to preserve error-boundary behaviorqueryOptionsused withisPending/isError/isSuccess@tanstack/solid-queryTests
corepack pnpm --filter @tanstack/solid-query exec vitest run --config vitest.local.config.ts src/__tests__/useQuery.test.tsxusing a temporary local copy of the package config withsolid({ hot: false }); the default Windows run fails before imports withfile:///@solid-refreshcorepack pnpm exec prettier --check .changeset/solid-query-status-resource.md packages/solid-query/src/useBaseQuery.ts packages/solid-query/src/__tests__/useQuery.test.tsxcorepack pnpm exec eslint --concurrency=auto -c eslint.config.js packages/solid-query/src/useBaseQuery.ts packages/solid-query/src/__tests__/useQuery.test.tsxcorepack pnpm --filter @tanstack/solid-query buildgit diff --checkLocal script note:
corepack pnpm --filter @tanstack/solid-query test:eslintandtest:types:tscurrentfail on this Windows checkout before reaching source files because checked-in symlink placeholders such aspackages/solid-query/root.eslint.config.jsare materialized as plain text (../../eslint.config.js).Summary by CodeRabbit