It’s mainly so u dont have to setup and initialize prisma or import it in every router. Instead the ctx option allows keeping all these sort of things shared.
Ok but if my routers become more complexe and I want to externalise it in services files, can I import it there or should I "drill prop" prisma in ctx ?
i think the ctx is exposed to make it easier group up such shared services in one place, but there isn't any requirement to use it. i would say that the better way would be ctx because that way u dont have dup imports
its done this way so that you know you have the same instance in every procedure, better dx of having it on ctx, and lets you monkeypatch it for testing