Pipe scoping in NestJS defines where a pipe is applied within the request processing hierarchy. Pipes can be scoped at four levels:

  1. Parameter-scoped: Bound directly to a parameter decorator — @Body(new ValidationPipe())
  2. Method-scoped: Applied to a single route handler — @UsePipes(new ZodValidationPipe(schema))
  3. Controller-scoped: Applied to all handlers in a controller — @UsePipes(new ValidationPipe()) on the controller class
  4. Global-scoped: Applied to all routes — app.useGlobalPipes(new ValidationPipe()) or via APP_PIPE token for DI support

The APP_PIPE token approach (registered in module providers) is preferred for global pipes because it enables dependency injection, unlike useGlobalPipes() which binds outside module context.