Target branch: code-graph-preview
Dependency
The TypeScript extractor is already available on code-graph-preview. No language-extractor issue blocks this resolver.
Goal
Add a bounded NestJS resolver that connects decorator-defined controller routes to their handler methods. The first version should focus only on HTTP controller routes that can be identified confidently from source.
Scope
- Detect NestJS through
@nestjs/common in dependencies or dev dependencies.
- Recognize classes decorated with
@Controller().
- Recognize methods decorated with
@Get, @Post, @Put, @Patch, @Delete, @Options, @Head, or @All.
- Combine the controller prefix and method path into a normalized route name such as
GET /users/:id.
- Emit a
route node and a function_ref reference to the controller method.
- Resolve an unambiguous route reference to the matching method node, preferring the same file/class context.
- Preserve unresolved or ambiguous references rather than guessing.
Required changes
- Add
src/graph/resolution/frameworks/nestjs.ts implementing FrameworkResolver.
- Register and export it from
src/graph/resolution/frameworks/index.ts.
- Add a minimal NestJS controller fixture.
- Add focused detection, extraction, resolution, and ambiguity tests.
Acceptance criteria
Out of scope
- Dependency-injection graph edges.
- Guards, pipes, interceptors, middleware, gateways, GraphQL, or microservices.
- Runtime decorator evaluation.
- Changes to the TypeScript extractor or graph core.
Contributor references
Contributor workflow
git switch code-graph-preview
git pull
git switch -c feat/nestjs-route-resolver
Open the pull request with base branch code-graph-preview.
Dependency
The TypeScript extractor is already available on
code-graph-preview. No language-extractor issue blocks this resolver.Goal
Add a bounded NestJS resolver that connects decorator-defined controller routes to their handler methods. The first version should focus only on HTTP controller routes that can be identified confidently from source.
Scope
@nestjs/commonin dependencies or dev dependencies.@Controller().@Get,@Post,@Put,@Patch,@Delete,@Options,@Head, or@All.GET /users/:id.routenode and afunction_refreference to the controller method.Required changes
src/graph/resolution/frameworks/nestjs.tsimplementingFrameworkResolver.src/graph/resolution/frameworks/index.ts.Acceptance criteria
npm run typecheck,npm test, andnpm run buildpass.Out of scope
Contributor references
src/graph/resolution/frameworks/express.tssrc/graph/__tests__/resolver-express.test.tsContributor workflow
Open the pull request with base branch
code-graph-preview.