-
-
Save currentoor/4241bb09de5293014e8633ff4e3ee6a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro defmutation2 | |
[dispatch with-sym policy params & args] | |
`(fulcro.server/defmutation ~dispatch ~params ~@args)) | |
(defmacro defmutation3 | |
[dispatch with-sym policy params [action-sym env & action-body]] | |
`(fulcro.server/defmutation ~dispatch ~params | |
(~action-sym ~env | |
~@action-body))) | |
[(macroexpand-1 '(defmutation2 schedule/edit with policy | |
[params] | |
(action [env] | |
env))) | |
(macroexpand-1 '(defmutation3 schedule/edit with policy | |
[params] | |
(action [env] | |
env)))] | |
=> [(fulcro.server/defmutation schedule/edit [params] (action [env] env)) | |
(fulcro.server/defmutation schedule/edit [params] (action [env] env))] | |
(defmutation2 schedule/edit with policy | |
[params] | |
(action [env] | |
env)) | |
=> #multifn[server-mutate 0x4c42265f] | |
(defmutation3 schedule/edit with policy | |
[params] | |
(action [env] | |
env)) | |
ExceptionInfo In: [2] val: (action [env] env) fails spec: :fulcro.server/mutation-args at: [:action] predicate: (and (list? %) (= (quote action) (first %))) | |
:clojure.spec.alpha/spec :fulcro.server/mutation-args | |
:clojure.spec.alpha/value (schedule/edit [params] (action [env] env)) | |
clojure.core/ex-info (core.clj:4617) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment