Skip to content

feat(graph): add NestJS controller route resolver - #102

Open
abhinav-phi wants to merge 1 commit into
mex-memory:mainfrom
abhinav-phi:feat/nestjs-route-resolver
Open

feat(graph): add NestJS controller route resolver#102
abhinav-phi wants to merge 1 commit into
mex-memory:mainfrom
abhinav-phi:feat/nestjs-route-resolver

Conversation

@abhinav-phi

@abhinav-phi abhinav-phi commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

  • Adds a NestJS FrameworkResolver for decorator-defined HTTP controller routes.
  • Detects NestJS through @nestjs/core or @nestjs/common dependencies.
  • Recognizes @Controller() prefixes and HTTP method decorators such as @Get(), @Post(), @Put(), @Patch(), @Delete(), @Options(), @Head(), and @All().
  • Emits stable route nodes and function_ref references to controller methods.
  • Resolves same-file handlers only when the target is unambiguous.
  • Adds a NestJS fixture, focused resolver tests, and framework-registry wiring.

Why

Closes #98.

This teaches the code graph about NestJS controller routing without changing the frozen FrameworkResolver interface or graph-core semantics.

Scope boundaries

This PR is limited to statically recognizable HTTP controller routes. Dependency-injection edges, guards, pipes, interceptors, middleware, gateways, GraphQL, microservices, and runtime decorator evaluation remain out of scope.

How to test

npm run typecheck
npm test
npm run build

Focused review should verify:

  • Positive and negative NestJS detection.
  • Controller-prefix and method-path normalization.
  • Multiple HTTP methods and parameterized paths.
  • Stable route-node identity.
  • Confident same-file handler resolution.
  • Missing or ambiguous handlers remain unresolved.
  • No graph identity, reconciliation, schema, or drift-semantics changes.

@theDakshJaitly
theDakshJaitly changed the base branch from code-graph-preview to main August 3, 2026 08:46
@abhinav-phi
abhinav-phi force-pushed the feat/nestjs-route-resolver branch from a652f92 to 99de109 Compare September 8, 2026 05:40
@abhinav-phi

Copy link
Copy Markdown
Contributor Author

Hi @theDakshJaitly @Yashasvi2229 — this PR has been open since mid-July with no reviews, so I gave it some maintenance:

  • Rebased onto latest main (it had fallen ~340 commits behind).
  • Verified locally: npm run typecheck, npm run build, and the resolver test suite all pass.
  • All CI checks on this branch are green.

The implementation targets the frozen FrameworkResolver interface, which is unchanged on current main, so no adaptation was needed beyond the rebase.

Is anything blocking this from review — or would you like changes first? Happy to iterate. (Tracking issue: #98, which this resolves.)

@theDakshJaitly

Copy link
Copy Markdown
Collaborator

Yeah our bad, got caught up in the new release, sorry for the delay in review

We will review asap, thanks for the rebase as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NestJS] Add controller route resolver

2 participants