This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-26
Channels
- # announcements (1)
- # autochrome-github (1)
- # babashka (9)
- # beginners (112)
- # bristol-clojurians (2)
- # calva (26)
- # cider (10)
- # clj-kondo (31)
- # cljs-dev (40)
- # clojure (114)
- # clojure-austin (1)
- # clojure-dev (112)
- # clojure-europe (22)
- # clojure-germany (5)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-spec (10)
- # clojure-uk (96)
- # clojurescript (39)
- # core-logic (5)
- # datomic (40)
- # fulcro (34)
- # graphql (17)
- # jobs (3)
- # kaocha (4)
- # leiningen (10)
- # luminus (1)
- # malli (3)
- # meander (44)
- # midje (2)
- # off-topic (40)
- # pathom (5)
- # re-frame (8)
- # reitit (8)
- # ring (3)
- # ring-swagger (4)
- # shadow-cljs (83)
- # spacemacs (96)
- # tools-deps (16)
- # vim (4)
- # xtdb (15)
- # yada (20)
Hello! How to troubleshoot that my resolver isn't called? See https://clojurians.slack.com/archives/C68M60S4F/p1585258283055800?thread_ts=1585258283.055800&cid=C68M60S4F thanks!
✅ 4
it seems in your query side the :latest-invoice
is missing the namespace, in the ::pc/output
it is :organization/latest-invoice
✅ 4
OMG, thanks a lot! I would need some kind of "idiot mode" that prints warnings when i ask for a key that Pathom does not know about (and has another "similar" one)
actually, that can be quite easy to do as an extra reader, try this setup and let me know what you think:
👀 4
(defn validate-connect-key-reader [env]
(let [k (-> env :ast :key)
index-oir (-> env ::pc/indexes ::pc/index-oir)]
(when (and (not (p/ident? k))
(not (p/placeholder-key? env k))
(not (contains? index-oir k)))
(println (str "WARN: trying to read key " k " which is not available in the index.")))
::p/continue))
(def parser
(p/parser
{::p/env {::p/reader [p/map-reader
pc/reader3
validate-connect-key-reader
pc/open-ident-reader
p/env-placeholder-reader]
::p/placeholder-prefixes #{">"}}
::p/mutate pc/mutate
::p/plugins [(pc/connect-plugin {::pc/indexes indexes
::pc/register registry})
p/error-handler-plugin
p/trace-plugin]}))
(defn validate-connect-key-reader [env]
(let [k (-> env :ast :key)
index-oir (-> env ::pc/indexes ::pc/index-oir)]
(when (and (not (p/ident? k))
(not (p/placeholder-key? env k))
(not (contains? index-oir k)))
(println (str "WARN: trying to read key " k " which is not available in the index.")))
::p/continue))
(def parser
(p/parser
{::p/env {::p/reader [p/map-reader
pc/reader3
validate-connect-key-reader
pc/open-ident-reader
p/env-placeholder-reader]
::p/placeholder-prefixes #{">"}}
::p/mutate pc/mutate
::p/plugins [(pc/connect-plugin {::pc/indexes indexes
::pc/register registry})
p/error-handler-plugin
p/trace-plugin]}))