Skip to content

docs(angular-query): fix three broken examples in the guides#11090

Open
meliharik wants to merge 1 commit into
TanStack:mainfrom
meliharik:docs-fix-angular-guides
Open

docs(angular-query): fix three broken examples in the guides#11090
meliharik wants to merge 1 commit into
TanStack:mainfrom
meliharik:docs-fix-angular-guides

Conversation

@meliharik

@meliharik meliharik commented Jul 21, 2026

Copy link
Copy Markdown

Three defects in the Angular guides, each verified against the repo itself.

guides/query-functions.md:11 — missing closing paren

-injectQuery(() => ({ queryKey: ['todos', todoId], queryFn: () => fetchTodoById(todoId) })
+injectQuery(() => ({ queryKey: ['todos', todoId], queryFn: () => fetchTodoById(todoId) }))

The line directly above it closes with })), and the React version of the same guide is balanced too.

guides/disabling-queries.md:73 — package does not exist

-import { skipToken, injectQuery } from '@tanstack/query-angular'
+import { skipToken, injectQuery } from '@tanstack/angular-query-experimental'

There is no @tanstack/query-angular package — packages/ contains only angular-query-experimental and angular-query-persist-client. This was the only occurrence of that name in the docs; every other Angular guide imports from @tanstack/angular-query-experimental.

guides/query-retries.md:36 — importing a symbol that isn't exported

   QueryCache,
   QueryClient,
-  QueryClientProvider,
+  provideTanStackQuery,
 } from '@tanstack/angular-query-experimental'

QueryClientProvider is a React export and is not in packages/angular-query-experimental/src/index.ts. The snippet meanwhile calls provideTanStackQuery(queryClient) twelve lines down without importing it, so swapping the two makes the import match what the example actually uses.

Docs only.

Summary by CodeRabbit

  • Documentation
    • Updated Angular guides to use the current query package imports and provider configuration.
    • Corrected a query function example so it compiles as shown.
    • Aligned disabling-query and retry examples with current Angular setup patterns.

@coderabbitai

coderabbitai Bot commented Jul 21, 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9ba1e012-a74b-4a24-b1c9-fb67a6cb9040

📥 Commits

Reviewing files that changed from the base of the PR and between 181ea82 and 0bb4769.

📒 Files selected for processing (3)
  • docs/framework/angular/guides/disabling-queries.md
  • docs/framework/angular/guides/query-functions.md
  • docs/framework/angular/guides/query-retries.md

📝 Walkthrough

Walkthrough

Angular documentation examples were updated to use current experimental package APIs, provider configuration, and valid injectQuery syntax.

Changes

Angular guide corrections

Layer / File(s) Summary
Align Angular API examples
docs/framework/angular/guides/disabling-queries.md, docs/framework/angular/guides/query-retries.md
Examples now import Angular Query APIs from @tanstack/angular-query-experimental and use provideTanStackQuery for provider configuration.
Correct query function example
docs/framework/angular/guides/query-functions.md
The single-todo injectQuery example now has properly closed syntax.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required template sections and checklist/release-impact details. Add the template headings for Changes, Checklist, and Release Impact, and fill in the required checkbox items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the PR's main change: fixing three broken Angular guide examples.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant