-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(tanstack-react-query): falsy cursors #6602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThis pull request refines the handling of infinite query parameters. In the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Component as MyComponent
participant Hook as useTRPCInfiniteQuery
participant Utils as getClientArgs
participant Server
User->>Component: Render & Click "Fetch More"
Component->>Hook: Call infinite query with options
Hook->>Utils: Prepare client args (check pageParam)
Utils-->>Hook: Return cursor from opts.initialCursor or input.cursor
Hook->>Server: Query with cursor value
Server-->>Hook: Return data and next cursor (if any)
Hook-->>Component: Update displayed data
Possibly related PRs
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
ERR_PNPM_OPTIONAL_DEPS_REQUIRE_PROD_DEPS Optional dependencies cannot be installed without production dependencies Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (20)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
🚅 Deployed to the trpc-pr-6602 environment in trpc-sse-and-websockets
|
@trpc/client
@trpc/next
@trpc/server
@trpc/react-query
@trpc/tanstack-react-query
@trpc/upgrade
commit: |
|
This pull request has been locked because we are very unlikely to see comments on closed issues. If you think, this PR is still necessary, create a new one with the same branch. Thank you. |
Closes #6599
🎯 Changes
Fix handling of falsiness + add regression test
Summary by CodeRabbit