TanStack Query + AppOperation Requests (Kit)
This skill is the portable version of the pattern:
- •Central
AppOperationclass (src/AppOperation.ts). - •
QUERY_KEYSobject (as const) +Requestsmap +requestsobject (src/api.ts). - •
appOperation.getRequestas the only HTTP entry point. - •TanStack Query hooks using
appOperationinqueryFn/mutationFn. - •A single
showToast(type, message)handler passed toAppOperation(and optionally overridden viasetToastHandler) so all success/error toasts are handled in one place; individual calls can passsuppressToast: truewhen they must be silent.
Use this whenever editing projects that consume tanstack-appoperation-kit.
For full instructions and examples, see the main README.