GrifnG
tRPC3y ago
3 replies
Grifn

Next.js app router catch-all HTTP methods

The app router already supports the catch-all file for route resolution, but AFAIK still expects separately method exports like export function GET(). I think this means we can't provide the tRPC NextApiHandler from the app router and we still need to use the pages directory (not a big deal but adding a whole extra directory just for the tRPC route currently).
Any way to provide the tRPC Next handler from the app router?
Was this page helpful?