I am using shadowcljs and I am trying to create a mutation on the server using code based of the example code. I have a really small mutation that always throws this error. Why is that?
[jchat.server-components.pathom-wrappers :refer [defmutation defresolver]]
(defmutation reset-users-db
"Removes all users"
[]
{::pc/output [:message]}
{:message "ok"})
Syntax error macroexpanding clojure.core/let at (user.clj:47:1). nil - failed: simple-symbol? at: [:bindings :form :local-symbol] spec: :clojure.core.specs.alpha/local-name nil - failed: vector? at: [:bindings :form :seq-destructure] spec: :clojure.core.specs.alpha/seq-binding-form nil - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-bindings nil - failed: map? at: [:bindings :form :map-destructure] spec: :clojure.core.specs.alpha/map-special-binding
Row 47 is the defmutation starting row.
With macroexpand:
(macroexpand '(defmutation reset-users-db
"Removes all users"
[]
{::pc/output [:message]}
{:message "ok"}))
=>
(do
(com.wsscode.pathom.connect/defmutation
reset-users-db
[env__26870__auto__ params__26871__auto__]
#:com.wsscode.pathom.connect{:output [:message]}
(clojure.core/let [nil env__26870__auto__ nil params__26871__auto__] {:message "ok"}))
(jchat.server-components.pathom-wrappers/register! reset-users-db))
macroexpandto see if it's expanding to something weird. I've never heard of that macro before.(clojure.core/let [nil env__26870....(let [nil ""])causes<CompilerException java.lang.Exception: Unsupported binding form: , compiling:(Clojure REPL:2:1)>in 1.7.0. I don't know whynilis there in the expansion, but that's your problem.nilwas there. Thank you.