This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-26
Channels
- # asami (2)
- # babashka (1)
- # beginners (31)
- # calva (11)
- # clj-together (3)
- # clojure (43)
- # clojure-europe (6)
- # clojure-norway (1)
- # clojurescript (14)
- # core-async (3)
- # core-logic (24)
- # cryogen (6)
- # datascript (2)
- # datomic (3)
- # fulcro (35)
- # honeysql (2)
- # hyperfiddle (12)
- # kaocha (3)
- # lsp (11)
- # off-topic (10)
- # pathom (2)
- # reagent (14)
- # releases (1)
- # sci (11)
- # shadow-cljs (27)
- # tools-deps (7)
Hi! In Pathom 2, how can I make a derived value that depends on 1 - 2 other values? Namely I want to make
(defresolvers dimensions [env {:product/keys [dimension-a dimension-b]}]
{::pc/input #{:product/dimension-a :product/dimension-b}
::pc/output [:product/dimensions]}
{:product/dimensions (if (and dimension-a dimension-b)
(str dimension-a " x " dimension-b)
(str "A=" dimension-a))})
where dimension-a is always defined but dimension-b is optional. 🙏