Guide

How It Works

Understand the internal flow of Nest Graph Inspector.

Nest Graph Inspector works by introspecting the runtime Nest container after your application bootstraps. This means the graph reflects what is actually loaded and wired — not what your source code suggests.

Flow

Start from the root module

The root module is automatically inferred from where you import NestGraphInspector.forRoot(), or you can explicitly set it configuration. This acts as the entry point.

Inspect the Nest runtime container

The module uses NestJS internal APIs to access the dependency injection container after it has been initialized.

Collect module and provider metadata

For each module, the inspector gathers:

  • Imported modules
  • Exported providers
  • Registered providers
  • Registered controllers

Resolve dependencies

For each provider and controller, the inspector resolves the constructor and property dependencies, tracing them back to their originating module.

Generate output

The collected data is processed and sent to all configured outputs, which can include JSON files, HTTP endpoints, or dynamically visualized in our Interactive Web Viewer.