CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.6.19-dev (changelog, source)
Search

Predicate NextJS::apiFolder

Gets a folder that contains API endpoints for a Next.js application. These API endpoints act as Express-like route-handlers. It matches both the Pages Router (pages/api/) Next.js 12 or earlier and the App Router (app/api/) Next.js 13+ structures.

Import path

import javascript
Folder apiFolder()