This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-18
Channels
- # announcements (8)
- # aws (5)
- # babashka (69)
- # beginners (37)
- # calva (222)
- # cider (10)
- # clj-commons (8)
- # clj-kondo (69)
- # cljdoc (5)
- # clojure (62)
- # clojure-dev (23)
- # clojure-europe (37)
- # clojure-italy (2)
- # clojure-nl (6)
- # clojure-sg (6)
- # clojure-uk (5)
- # clojurescript (25)
- # clojureverse-ops (12)
- # conjure (1)
- # cursive (1)
- # fulcro (9)
- # gorilla (1)
- # graalvm (6)
- # graphql (1)
- # gratitude (1)
- # honeysql (7)
- # introduce-yourself (4)
- # jobs (1)
- # kaocha (9)
- # keyboards (4)
- # leiningen (8)
- # lsp (21)
- # malli (9)
- # music (3)
- # nextjournal (17)
- # nrepl (6)
- # off-topic (10)
- # pathom (12)
- # portal (25)
- # reagent (8)
- # releases (1)
- # specter (1)
- # xtdb (1)
Hi there! I'm having trouble figuring out if I can handle a case of a resolver returning multiple inputs.
So, the idea is: I have a resolver that supposedly return :user/login
and :user/password
for example. I want it to return an array - is it possible? Instead of returning a map with both attributes, return a vector of maps?
yes, taht's correct, give it a name and return a vector of maps
Query looking something like this:
[{:user/find-logins [:user/login :user/password]}]
Thanks, I'll try 🙂
From within the process-resolver-error
or process-mutation-error
plugin can I somehow assoc in an extra key into the response if a certain condition is met? I want to trigger a different codepath post processing if a certain error is triggered and I’m trying to figure out the best way to do this (note I’m using lenient mode)
My other thought is that I could iterate through the entire response post-processing and search for the error but this doesn’t seem as clean due to the fact that errors can exist at various paths in the response.
I think I’m going to go the postwalk approach instead, but if there’s a better way I’m all ears 🙂
actually postwalk ended up not being too bad! just had to find instances of ExceptionInfo
there is also the plugin entry point ::pcr/wrap-resolver-error
that you can use
maybe you can do something around that
would love to hear if that works, or if it doesn't, why not