Skip to content

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

Answered by dehli
dehli asked this question in Q&A
Discussion options

You must be logged in to vote

Copying @wilkerlucio's answer from Slack for more visibility:

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

(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
                                                          …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dehli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant