Skip to content

chore: update type tests to use new query methods, types - #11345

Open
DogPawHat wants to merge 2 commits into
TanStack:mainfrom
DogPawHat:simplifed-query-methods/internal-tests-types
Open

chore: update type tests to use new query methods, types#11345
DogPawHat wants to merge 2 commits into
TanStack:mainfrom
DogPawHat:simplifed-query-methods/internal-tests-types

Conversation

@DogPawHat

@DogPawHat DogPawHat commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🎯 Changes

same as #11340 but for the type only tests.

✅ 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 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

  • Bug Fixes

    • Improved type validation to prevent infinite-query options from being passed to standard query execution APIs.
    • Updated type checks across supported integrations to more accurately distinguish query and infinite-query operations.
  • Chores

    • Documented deprecated query methods scheduled for removal in the next major version.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 360b3240-d3d8-43e4-95af-4f1fe242b75e

📥 Commits

Reviewing files that changed from the base of the PR and between 6f31ef6 and 73ffa9b.

📒 Files selected for processing (4)
  • packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts
  • packages/preact-query/src/__tests__/infiniteQueryOptions.test-d.tsx
  • packages/query-core/src/__tests__/queryClient.test-d.tsx
  • packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The PR updates query client type tests to use execution-specific option types and adds framework-level assertions that infinite query options are rejected by queryClient.query. It also marks selected methods for removal in the next major version.

Changes

Query option type validation

Layer / File(s) Summary
Query client option shapes
packages/query-core/src/__tests__/queryClient.test-d.tsx
The typed and untyped tests use QueryExecuteOptions and InfiniteQueryExecuteOptions. Infinite query execution calls reuse the shared infiniteQueryOptions variable.
Framework infinite-option checks
packages/angular-query-experimental/src/__tests__/infinite-query-options.test-d.ts, packages/preact-query/src/__tests__/infiniteQueryOptions.test-d.tsx, packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx
Type assertions verify that queryClient.query rejects infinite query options. Comments mark selected methods for removal in the next major version.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 73ffa

This change updates type-level tests to reflect the new query methods and types without changing published runtime behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: tkdodo, manudeli

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description includes all required sections, completed checklist items, and correctly identifies the change as internal type-test maintenance with no release impact.
Title check ✅ Passed The title clearly and concisely describes the main change: updating type tests to use new query methods and types.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant