This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-04
Channels
- # aleph (2)
- # beginners (80)
- # boot (18)
- # cider (6)
- # cljs-dev (14)
- # cljsrn (5)
- # clojure (114)
- # clojure-android (5)
- # clojure-dev (8)
- # clojure-greece (6)
- # clojure-italy (9)
- # clojure-russia (108)
- # clojure-uk (82)
- # clojurescript (158)
- # css (1)
- # cursive (21)
- # data-science (1)
- # datomic (66)
- # emacs (9)
- # ethereum (3)
- # fulcro (26)
- # graphql (7)
- # hoplon (25)
- # juxt (2)
- # keechma (34)
- # lein-figwheel (4)
- # leiningen (2)
- # off-topic (4)
- # om (5)
- # onyx (14)
- # parinfer (2)
- # pedestal (17)
- # planck (3)
- # portkey (14)
- # re-frame (23)
- # reagent (12)
- # ring (8)
- # rum (1)
- # shadow-cljs (506)
- # spacemacs (2)
- # vim (11)
- # yada (6)
Hey all sorry for another newbie question. I've just been reading about errrors and how you are supposed to use resolve-as. http://lacinia.readthedocs.io/en/latest/resolve/resolve-as.html To me it sounds like you would wrap your resolver function with a try catch, then in the catch call
(resolve-as resolved-value {:message "something when wrong"})
Yes, that's that's pretty much exactly how it goes. Earlier versions of Lacinia would catch exceptions inside field resolver functions for you, but that turned out to be unnecessary overhead most of the time, and got in the way of actually debugging real problems. Please feel free to suggest improvements to the documentation, if this was not clear.