codejump

Execution Order & Scopes

Preview — 3 of 10 questions

Place these in the correct order for a single successful request: Pipes, Guards, Interceptors (pre), Route Handler, Interceptors (post), Middleware.

AMiddleware → Guards → Interceptors (pre) → Pipes → Handler → Interceptors (post)
BGuards → Middleware → Pipes → Interceptors (pre) → Handler → Interceptors (post)
CMiddleware → Pipes → Guards → Handler → Interceptors (pre) → Interceptors (post)
DInterceptors (pre) → Middleware → Guards → Pipes → Handler → Interceptors (post)

Guards are registered globally, on the controller, and on the method. In what order are they evaluated for a request?

AMethod → Controller → Global
BGlobal → Controller → Method
CThey run in registration order regardless of scope
DOnly the most specific (method) guard runs

Two guards are listed in one @UseGuards(A, B). What logic combines them?

AOR — the request passes if either A or B returns true
BAND — both A and B must return true (and they short-circuit on the first false)
CXOR — exactly one must return true
DThey run independently and the last one wins

Sign up free to play

Answer all 10 questions (7 more), see explanations for every answer, and track your score.