how should I do something like this correctly:
(def config
{
:a {}
:b {:x (:x (ig/ref :a))
:y (:y (ig/ref :a))}})
?
e.g. how to use ig/ref in nested form?@lambder what do you expect, and what do you get?
(:x (ig/ref :a)
result in nil (as expected but not desired)
I'd like to have the value associated with :x
from the the map produced by ig/init :a
multimethod call.
You’d need to have intermediate keys that pull the :x
and :y
values out of :a
. Or do so in :b
’s ig/init-key
method.
I can't do it on :b
's method as it can technically not be in my control.
By intermediate keys, so you mean, two separate dedicated ig/init-key methods for them?
Yes. Create new keys to split up :a
.