refactor(core-trpc): break the core-api package cycle

core-trpc imported AppRouter (type-only) from core-api, which depends
on the features, which depend on core-trpc — a cycle that killed every
turbo graph walk (lint/build/CI) and an illegal core -> core-composition
boundary edge. The tRPC context is now router-agnostic (AnyTRPCRouter);
useTRPC takes the router type as a generic and each feature exports a
type-only app-slice (e.g. BlogAppSlice) mirroring its mount key, so UI
hooks keep full procedure typing without touching the composition layer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 17:38:12 +02:00
parent 5047953c9a
commit c551b33bfb
14 changed files with 70 additions and 24 deletions

View File

@@ -15,7 +15,6 @@
"test": "vitest run --passWithNoTests"
},
"dependencies": {
"@repo/core-api": "workspace:*",
"@tanstack/react-query": "^5.66.0",
"@trpc/client": "^11.17.0",
"@trpc/react-query": "^11.17.0",