You’ll want to use namespaced keywords for your Integrant keys. Unnamespaced keywords have no inheritance.
I’m also not sure why you have all of those factories. Instead…
{:example/db {...}
:example/email {...}
:example/missile {....}
:example.handler/x {:db #ig/ref :example/db, :email #ig/ref :example/email ...}
:example.handler/y {...}
:example/routes ["/x" #ig/ref :example.handler/x, "/y" #ig/ref :example.handler/y]
:example/app #ig/ref :example/routes}
So my code would turn into something like this?
Yep
Great! Thank you. Looks awesome 🙂
So I if wanted to add Logging, Just create a :log key then reference everywhere I need it so :example.handler/x-get {... :logger #ig/ref :log}
for each of my handlers?
Yes, though :example/log
would be better.
With the alpha version of Integrant, you can also add in default keys if you want, for example, all handlers to have logging automatically.