Skip to content

refactor(examples/lit/pagination): infer the controller types instead of passing generics that repeat the field types - #12185

Merged
sukvvon merged 1 commit into
mainfrom
refactor/lit-pagination-infer-controller-types
Oct 20, 2026
Merged

sukvvon merged 1 commit into
mainfrom
refactor/lit-pagination-infer-controller-types

Conversation

@sukvvon

@sukvvon sukvvon commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

🎯 Changes

The lit pagination example passed generics to createQueryController and createMutationController that repeat the types already declared on the projectsQuery, createProjectMutation, and favoriteMutation fields they are assigned to. Remove the generics from the calls and keep the field types, which still type the mutation variables and the onMutate result.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
  • I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Refactor
    • Simplified pagination example configuration by relying on inferred types for query and mutation controllers.

… of passing generics that repeat the field types
@sukvvon sukvvon self-assigned this Oct 20, 2026
@changeset-bot

changeset-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 648b298

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud

nx-cloud Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 648b298

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded <1s View ↗
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 55s View ↗

☁️ Nx Cloud last updated this comment at 2026-10-20 03:16:24 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@12185

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@12185

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@12185

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@12185

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@12185

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@12185

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@12185

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@12185

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@12185

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@12185

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@12185

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@12185

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@12185

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@12185

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@12185

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@12185

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@12185

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@12185

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@12185

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@12185

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@12185

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@12185

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@12185

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@12185

commit: 648b298

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: TanStack/query/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 12c8c33e-1017-4b19-b8e5-5eb399671b14
📥 Commits

Reviewing files that changed from the base of the PR and between 4ea78d6 and 648b298.

📒 Files selected for processing: 1
  • examples/lit/pagination/src/main.ts
+--------------------------------------------------------------------------------+
| This conditional is a choose-your-own-adventure where every choice is 'panic'. |
+--------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.76 KB (0%)
react minimal 8.59 KB (0%)

@sukvvon
sukvvon merged commit 8aea733 into main Oct 20, 2026
8 of 9 checks passed
@sukvvon
sukvvon deleted the refactor/lit-pagination-infer-controller-types branch October 20, 2026 03:19
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