This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-29
Channels
- # announcements (6)
- # babashka (7)
- # beginners (24)
- # calva (2)
- # cider (21)
- # clj-kondo (49)
- # cljdoc (29)
- # clojure (56)
- # clojure-dev (2)
- # clojure-europe (15)
- # clojure-nl (6)
- # clojure-norway (27)
- # clojure-uk (3)
- # clojuredesign-podcast (6)
- # clojurescript (1)
- # conjure (1)
- # core-async (8)
- # cryogen (2)
- # cursive (6)
- # data-science (1)
- # datomic (12)
- # events (1)
- # fulcro (16)
- # graalvm (28)
- # hyperfiddle (2)
- # lambdaisland (4)
- # leiningen (20)
- # observability (1)
- # off-topic (24)
- # pathom (5)
- # pedestal (10)
- # portal (7)
- # practicalli (1)
- # reitit (5)
- # rewrite-clj (20)
- # shadow-cljs (18)
- # vim (8)
- # xtdb (9)
With Pathom3, is it possible to have two resolvers that output the same top-level attribute, but return different nested attributes and have one depend on the other?
e.g.
resolver 1: no input, output: [{:a [:b]}]
resolver 2: input: [{:a [:b]}]
, output [{:a [:c :d]}]
then run a query like: [{:a [:d]}]
and expect it to call resolver1 and then resolver2?
From my experimentation the answer appears to be "no".
can you reformulate resolver 2 having input [:b] instead of [{:a [:b]}]?
but it’s worth noting that if you have multiple different nested provision, Pathom will try to evaluate which of those are better suited to fulfill the whole requirements, considering everything that’s requested under that sub path