Skip to content

feat(query)!: redesign pageParam input to use a function and refine internal types#126

Merged
dinwwwh merged 31 commits intomainfrom
feat/query/change-place-of-cursor
Feb 8, 2025
Merged

feat(query)!: redesign pageParam input to use a function and refine internal types#126
dinwwwh merged 31 commits intomainfrom
feat/query/change-place-of-cursor

Conversation

@dinwwwh
Copy link
Copy Markdown
Member

@dinwwwh dinwwwh commented Feb 8, 2025

.infiniteOptions will no longer automatically merge the cursor into your input. Instead, you'll need to define the input using a function:

const query = useInfiniteQuery(utils.infiniteOptions({
  input: (pageParam) => ({ cursor: pageParam }),
  getNextPageParam,
  initialPageParam,
}))

This gives you more control over where the cursor is placed and improves compatibility by removing the requirement for your input to match { cursor?: any }.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orpc ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2025 7:02am

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 8, 2025

Open in Stackblitz

More templates

@orpc/client

npm i https://pkg.pr.new/@orpc/client@126

@orpc/openapi

npm i https://pkg.pr.new/@orpc/openapi@126

@orpc/contract

npm i https://pkg.pr.new/@orpc/contract@126

@orpc/react-query

npm i https://pkg.pr.new/@orpc/react-query@126

@orpc/server

npm i https://pkg.pr.new/@orpc/server@126

@orpc/shared

npm i https://pkg.pr.new/@orpc/shared@126

@orpc/vue-colada

npm i https://pkg.pr.new/@orpc/vue-colada@126

@orpc/zod

npm i https://pkg.pr.new/@orpc/zod@126

@orpc/vue-query

npm i https://pkg.pr.new/@orpc/vue-query@126

commit: fff5c7d

@dinwwwh dinwwwh merged commit 172fe95 into main Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant