What problem does it solve?
This Skill streamlines the integration of TanStack Query (React Query, Svelte Query) with wellcrafted's Result and error-handling patterns, simplifying the management of asynchronous data operations.
Core Features & Use Cases
- Define Queries and Mutations: Easily set up queries and mutations that return
Result types, ensuring robust error handling.
- Dual Interface: Provides both reactive (
.options) and imperative (.fetch()/.execute()) interfaces for flexible usage in components or workflows.
- Error Transformation: Facilitates transforming technical service errors into user-friendly messages at the query boundary.
- Use Case: When building a dashboard, use this Skill to define queries for fetching user data and mutations for updating user profiles, ensuring that any errors during these operations are gracefully handled and presented to the user.
Quick Start
Use the query-factories skill to define a query for fetching user data with the key ['users', userId].