Is there a particular reason why defresolver/defmutation
aren't wrapped with #?(:clj)
at the moment? It prevents pathom from compiling under shadow-cljs, but I was wondering if there's a reason for doing it this way that I'm missing
@jimberlage you can use pathom both on server and client
I know - it shouldn't prevent functionality on the server. The other macros are wrapped in #?(:clj)
, which plays nice with clojurescript. It's only defresolver/defmutation
that are unwrapped, which causes compiler errors
Where? https://github.com/wilkerlucio/pathom/blob/master/src/com/wsscode/pathom/connect.cljc#L1541
Here's an example of a macro in cljc that works well when compiling under shadow-cljs: https://github.com/wilkerlucio/pathom/blob/2c707bbcad45d37250a89332ae889865ab8498ca/src/com/wsscode/pathom/trace.cljc#L53
If the code were updated to do the same for the other macros, pathom would work under shadow-cljs no problem
@jimberlage hello, can you open a issue for it? or if you like to change and send a PR, welcome as well 🙏
I already have a PR open for it, if you want to check it out - https://github.com/wilkerlucio/pathom/pull/172
merged ✅
:man-facepalming: my bad, checking it now
Really appreciate your work on pathom, btw!