What problem does it solve?
Provides a clear, signal-first approach for server-state management in Angular applications, removing boilerplate around data fetching, caching, and mutation coordination so components can declaratively consume asynchronous data.
Core Features & Use Cases
- Signal-based Queries and Mutations: Use injectQuery and injectMutation to expose reactive signals for data, loading, and error states directly to component templates.
- Caching, Invalidation & Optimistic Updates: Configure QueryClient for cache policies, invalidate queries on mutations, and implement optimistic updates for snappy UI.
- DevTools and Service Configuration: Integrate Angular Query DevTools and provideTanStackQuery with a shared QueryClient in application providers for centralized behavior.
- Use Case: Fetch a todos list with injectQuery, display loading/error states in a template, and use injectMutation to add a todo with optimistic update and cache invalidation.
Quick Start
Use the angular-query skill to configure provideTanStackQuery with a QueryClient and create an injectQuery that fetches '/api/todos' and exposes signal-based data to a component template.