integrant

2018-06-11T13:22:20.000351Z

You’ll want to use namespaced keywords for your Integrant keys. Unnamespaced keywords have no inheritance.

2018-06-11T13:23:15.000520Z

I’m also not sure why you have all of those factories. Instead…

2018-06-11T13:27:00.000100Z

{: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}

grierson 2018-06-11T13:46:13.000720Z

So my code would turn into something like this?

2018-06-11T13:46:44.000413Z

Yep

grierson 2018-06-11T13:47:22.000207Z

Great! Thank you. Looks awesome 🙂

grierson 2018-06-11T13:49:06.000186Z

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?

2018-06-11T13:49:41.000046Z

Yes, though :example/log would be better.

2018-06-11T13:50:12.000071Z

With the alpha version of Integrant, you can also add in default keys if you want, for example, all handlers to have logging automatically.

👍 1