docs: Add Lazy schema example to useQuery#3843
Conversation
Shows how to use useQuery with Lazy's .query accessor to resolve deferred relationships on demand, with a Department/Building HooksPlayground demo. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3843 +/- ##
=======================================
Coverage 98.08% 98.08%
=======================================
Files 152 152
Lines 2871 2871
Branches 563 563
=======================================
Hits 2816 2816
Misses 11 11
Partials 44 44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
useQuery()docs showing how to resolve deferred relationships usingLazy's.queryaccessor withuseQuerybuildingsis aLazy([Building])field, resolved on demand in a child componentTest plan
yarn start:vscodeinwebsite/)Lazyis in scope (requires packages to be built)Made with Cursor
Note
Low Risk
Documentation-only change that adds a new example; main risk is broken/incorrect sample code in the interactive HooksPlayground.
Overview
Adds a new “Lazy relationships” section to
docs/core/api/useQuery.mddemonstrating how to useLazyschema fields via their.queryaccessor withuseQuery.Includes an interactive
HooksPlaygroundexample (Department/Building) that resolves related entities on demand in a child component to limit re-renders.Written by Cursor Bugbot for commit 801481b. This will update automatically on new commits. Configure here.