Skip to content

docs(preact-query): correct inaccurate JSDoc statements - #11367

Merged
sukvvon merged 2 commits into
mainfrom
docs/preact-query-jsdoc-inaccurate-statements
Sep 2, 2026
Merged

docs(preact-query): correct inaccurate JSDoc statements#11367
sukvvon merged 2 commits into
mainfrom
docs/preact-query-jsdoc-inaccurate-statements

Conversation

@sukvvon

@sukvvon sukvvon commented Sep 2, 2026

Copy link
Copy Markdown
Member

🎯 Changes

Corrects 6 inaccurate JSDoc statements in packages/preact-query/src/, and regenerates the affected reference docs under docs/framework/preact/reference/ to match.

  • mutationOptions.ts: without a mutationKey, a mutation can still be targeted via other useMutationState filters (e.g. status) — it's only a mutationKey filter that can't reach it.
  • queryOptions.ts / infiniteQueryOptions.ts: the queryFn-omission guidance no longer implies a default query function defers a fetch the way enabled: false does — omitting queryFn alone still triggers a fetch that fails with "Missing queryFn" unless enabled is false or a default query function has been defined.
  • useInfiniteQuery.ts (3 overloads): queryFn is also accepted by useQuery, so it isn't something useInfiniteQuery "adds" — removed from that list.
  • useMutation.ts: mutate's @returns docs now distinguish hook-level callbacks (fire on every mutation) from per-call callbacks (fire only for the latest call, and only while still mounted).
  • useSuspenseQueries.ts (2 overloads): the top-level subscribed option from useQueries isn't supported here either — added to the list of unsupported options alongside throwOnError/enabled/placeholderData.

✅ 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

  • Documentation
    • Clarified query behavior when queryFn is omitted, including failed fetches and the use of enabled: false.
    • Clarified mutation filtering and the behavior of per-call callbacks during concurrent mutations or component unmounting.
    • Documented that useSuspenseQueries does not support the top-level subscribed option.
    • Updated API reference source links and option descriptions for accuracy.

@sukvvon sukvvon self-assigned this Sep 2, 2026
@nx-cloud

nx-cloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit ea9cc65

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

☁️ Nx Cloud last updated this comment at 2026-09-02 07:24:00 UTC

@coderabbitai

coderabbitai Bot commented Sep 2, 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: Team

Run ID: 7d99474e-e9db-4c60-a03c-88bf79cd1a64

📥 Commits

Reviewing files that changed from the base of the PR and between 4c568a2 and ea9cc65.

📒 Files selected for processing (16)
  • docs/framework/preact/reference/functions/infiniteQueryOptions.md
  • docs/framework/preact/reference/functions/mutationOptions.md
  • docs/framework/preact/reference/functions/queryOptions.md
  • docs/framework/preact/reference/functions/useInfiniteQuery.md
  • docs/framework/preact/reference/functions/useMutation.md
  • docs/framework/preact/reference/functions/useSuspenseQueries.md
  • docs/framework/preact/reference/type-aliases/DefinedInitialDataInfiniteOptions.md
  • docs/framework/preact/reference/type-aliases/DefinedInitialDataOptions.md
  • docs/framework/preact/reference/type-aliases/UnusedSkipTokenInfiniteOptions.md
  • docs/framework/preact/reference/type-aliases/UnusedSkipTokenOptions.md
  • packages/preact-query/src/infiniteQueryOptions.ts
  • packages/preact-query/src/mutationOptions.ts
  • packages/preact-query/src/queryOptions.ts
  • packages/preact-query/src/useInfiniteQuery.ts
  • packages/preact-query/src/useMutation.ts
  • packages/preact-query/src/useSuspenseQueries.ts

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


📝 Walkthrough

Walkthrough

The PR updates Preact Query generated references and source JSDoc. It refreshes source links and clarifies query-function, infinite-query, suspense-query, mutation-filtering, and mutation-callback behavior. No runtime code or public declarations change.

Changes

Preact Query documentation

Layer / File(s) Summary
Refresh generated source links
docs/framework/preact/reference/functions/{infiniteQueryOptions,mutationOptions,queryOptions,useMutation}.md, docs/framework/preact/reference/type-aliases/{DefinedInitialDataInfiniteOptions,DefinedInitialDataOptions}.md
Updated Defined in links to current source line numbers.
Clarify query option behavior
packages/preact-query/src/{infiniteQueryOptions,queryOptions}.ts, docs/framework/preact/reference/type-aliases/{UnusedSkipTokenInfiniteOptions,UnusedSkipTokenOptions}.md
Documented the "Missing queryFn" fetch failure, the enabled: false requirement, and the behavior of default query functions.
Align hook option documentation
packages/preact-query/src/{useInfiniteQuery,useSuspenseQueries}.ts, docs/framework/preact/reference/functions/{useInfiniteQuery,useSuspenseQueries}.md
Removed queryFn from the listed additional infinite-query options and documented unsupported top-level subscribed for suspense queries.
Clarify mutation behavior
packages/preact-query/src/{mutationOptions,useMutation}.ts, docs/framework/preact/reference/functions/{mutationOptions,useMutation}.md
Documented mutation filtering without mutationKey and the mounting and latest-call conditions for per-call callbacks.

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

Merge Risk: ⚪ Minimal · up to ea9cc

This PR corrects inaccurate Preact Query documentation and regenerates the corresponding reference pages without changing executable behavior or public type signatures. No actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested reviewers: tkdodo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: correcting inaccurate JSDoc statements in Preact Query documentation.
Description check ✅ Passed The description follows the required template, explains the documentation corrections and motivation, completes the checklist, and identifies the change as docs-only with no release impact.
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 6…
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.
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 6 files. (10 skipped: 10 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/preact-query-jsdoc-inaccurate-statements

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

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

2 package(s) bumped directly, 23 bumped as dependents.

🟨 Minor bumps

Package Version Reason
@tanstack/svelte-query 6.1.48 → 6.2.0 Changeset
@tanstack/svelte-query-devtools 6.1.48 → 6.2.0 Dependent
@tanstack/svelte-query-persist-client 6.1.48 → 6.2.0 Dependent
@tanstack/vue-query-devtools 6.1.48 → 6.2.0 Dependent

🟩 Patch bumps

Package Version Reason
@tanstack/query-core 5.102.8 → 5.102.9 Changeset
@tanstack/angular-query-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/angular-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/eslint-plugin-query 5.102.8 → 5.102.9 Dependent
@tanstack/lit-query 0.2.20 → 0.2.21 Dependent
@tanstack/preact-query 5.102.8 → 5.102.9 Dependent
@tanstack/preact-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/preact-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/query-async-storage-persister 5.102.8 → 5.102.9 Dependent
@tanstack/query-broadcast-client-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/query-persist-client-core 5.102.8 → 5.102.9 Dependent
@tanstack/query-sync-storage-persister 5.102.8 → 5.102.9 Dependent
@tanstack/react-query 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-next-experimental 5.102.8 → 5.102.9 Dependent
@tanstack/react-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query-devtools 5.102.8 → 5.102.9 Dependent
@tanstack/solid-query-persist-client 5.102.8 → 5.102.9 Dependent
@tanstack/vue-query 5.102.8 → 5.102.9 Dependent

@pkg-pr-new

pkg-pr-new Bot commented Sep 2, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

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

@tanstack/eslint-plugin-query

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

@tanstack/lit-query

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

@tanstack/preact-query

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

@tanstack/preact-query-devtools

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

@tanstack/preact-query-persist-client

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

@tanstack/query-async-storage-persister

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

@tanstack/query-broadcast-client-experimental

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

@tanstack/query-core

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

@tanstack/query-devtools

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

@tanstack/query-persist-client-core

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

@tanstack/query-sync-storage-persister

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

@tanstack/react-query

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

@tanstack/react-query-devtools

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

@tanstack/react-query-next-experimental

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

@tanstack/react-query-persist-client

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

@tanstack/solid-query

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

@tanstack/solid-query-devtools

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

@tanstack/solid-query-persist-client

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

@tanstack/svelte-query

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

@tanstack/svelte-query-devtools

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

@tanstack/svelte-query-persist-client

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

@tanstack/vue-query

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

@tanstack/vue-query-devtools

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

commit: ea9cc65

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
react full 11.87 KB (0%)
react minimal 8.84 KB (0%)

@sukvvon
sukvvon merged commit 1a5331a into main Sep 2, 2026
9 checks passed
@sukvvon
sukvvon deleted the docs/preact-query-jsdoc-inaccurate-statements branch September 2, 2026 07:25
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