Fork me on GitHub
#pathom
<
2020-12-10
>
wilkerlucio19:12:52

hello everyone, just to let you know I setup the Discussions for Pathom in Github, yet another place if you want to send more durable ideas and etc: https://github.com/wilkerlucio/pathom3/discussions

👍 3
wilkerlucio20:12:38

new Pathom 3 docs page on Planner! I'm very excite to share this with you, it still a first version of it and there are still a lot to cover, but the current page can demonstrate the basics of how planning works on Pathom 3, it includes an interactive tool so you can see the planning happening step by step, I hope this can help you understand how pathom does its core behavior, check at: https://pathom3.wsscode.com/docs/planner I hope you enjoy!

🎉 21
bbss15:12:16

really really cool! I tried to use the dotfile graphs in one of the namespaces to explore it a bit, but couldn't make much sense out of it. This web-app thing is awesome!

bbss15:12:31

I can imagine that being super useful when you can add durations to the edges for debugging performance.

wilkerlucio14:12:55

yes, and this data is available after running, but what we are seeing now is just the planning step 🙂

👍 3
dehli23:12:56

Is it possible to have defmutation errors also update the ::p.core/errors key?

wilkerlucio06:12:58

you can do with a custom ::p/process-error:

👍 3
wilkerlucio06:12:00

(def mutation-parser
  (p/parser
    {::p/env     {::p/reader               [p/map-reader
                                            pc/reader2
                                            pc/open-ident-reader
                                            p/env-placeholder-reader]
                  ::p/placeholder-prefixes #{">"}
                  ::p/process-error        (fn [env err]
                                             (if (= :call (-> env :ast :type))
                                               (p/add-error (-> env
                                                                (update ::p/path p.misc/vconj (-> env :ast :key))
                                                                (dissoc ::p/process-error)) err))
                                             (p/error-message err))}
     ::p/mutate  pc/mutate
     ::p/plugins [(pc/connect-plugin {::pc/register mutation-error})
                  p/error-handler-plugin
                  p/request-cache-plugin
                  p/trace-plugin]}))

dehli12:12:36

awesome! thanks so much 🙂 is it cool for me to create a github issue with the question and then copy you solution there for more visibility?

wilkerlucio14:12:34

sure, I think this is a good opportunity to try: https://github.com/wilkerlucio/pathom/discussions

👍 3