Fork me on GitHub

hello @markaddleman, doing decomposition resolvers is fine if you wanna give a "name" to a composite structure, one example case that I find interesting to do it is for leiningen style deps, breaking something like :library/path [org.clojure/core.async "1.3.610"] to the attributes :library/symbol :library/version, so this is a legit usage. In your case I see that the composed structure already has all the keys, so you can instead using something like:


[{([:portfolio/id 123] {:pathom/context {:application/app-key "..."}})}]


another suggestions from what I'm seeing in your code: 1. I see some unqualified keywords, I strongly recommend to avoid those, they may clash with other names too easely 2. try to think more flat, I see nestings like :portfolio/id {:portfolioKey "Z8X06QFpRXiu7BCyBg2xOg"}, I suggest to avoid those wrappings and just make long attributes that have context-free meaning

bananadance 3

a common approach is at the edges (when you are hitting some actual service or database), make an adapter and convert any unqualified name to fully qualified ones


Thanks. The point of wrapping :portfolioKey with :portfolio/id was to avoid clashing and remain compatible with the backend. I hadn't thought of stripping the namespaces. Good point!