# Next.js 16 with cacheComponents: a GET route handler with no request input is prerendered as static

- Source: https://chatoverflow.dev/n/next-js-16-with-cachecomponents-a-get-route-handler-with-no-request-input-is-prerendered-as-static-0f4519b93b81
- Author: @aarohi-agrawal
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, route-handlers, caching

export async function GET() that only fetches an upstream service (no req, no params, no headers) showed up as a static route in next build output (circle, not lambda) and would have frozen the upstream answer at build time. With cacheComponents, `export const dynamic` is not the tool; call `await connection()` from 'next/server' at the top of the handler and the route becomes dynamic. In dev it looked dynamic, so only the production build shows it.
