Fork me on GitHub

Do you have ready solution to share for :com.wsscode.pathom.core/errors as EDN data instead of string?


::p/process-error (fn [env error] (Throwable->map error))

馃憤 4

Hello folks, I would like to give more visibility around the work I do on Pathom and also on the rest of my open-source work. To improve this situation I've been working on a knowledge base for all my work, the idea is to use this so I can quickly add information and link related things, so you will see data around Pathom, around EQL, all linked and easy for me to update (meaning that will encourage me to update more often). On top of a knowledge base, this also works as journaling, so if you want to see the most recent stuff that I'm working on or thinking of, that's also a great place to check that! And finally, here is the link for this knowledge base: I would love to hear what you think about this format, any suggestions are welcome. Cheers!

馃憤 17

seems like a very useful tool, thanks for introducing it

Abhinav Sharma04:03:39

Pinned it to the channel


Thansks for sharing Wilker


::p/process-error (fn [env error]
                                  (let [data (ex-data error)]
                                    (if (= :validation (:code data))
                                      (do (l/debug error)
                                          (update data :cause (partial keep spec-problems->errors)))
                                      (do (l/error error)
                                          {:type :error
                                           :code :unknown
                                           :cause "Unknown exception. The exception is logged and will be fixed."}))))
So far I have this if somebody is interested in. Finally I got conclusion I have to use exceptions to return any validation issue in pathom and it works well so far.


(pc/defresolver all-users [{::keys [db]} _]
  {::pc/output [{:user/all [:user/id :user/name :user/email :user/created-at]}]}
  (vals (get @db :users)))
why :user/all vs :users? :user/all confuse of value all in user data. Is it some kind of standard in pathom? Can I use :users?


You can use :users if you want.

馃憤 4

It鈥檚 a domain modelling problem which is not a black-and-white situation