Is there anyway to avoid full paths to mutations?
(pc/defmutation submit-space-update [env inputs]
{::pc/sym `app.ui.listing.mutations/submit-space-update}
(log/info "Submit space" inputs))
it just seems a little overkill for me to have to use the full path in pc/sym
to link up to the client side mutations for any server side mutations I have
@wilkerlucio Iām looking for a way to not have the long full path to the client side mutation
@njustice you can use alias
(just on clj@jvm)
Just like this:
https://github.com/clojure/spec.alpha/blob/master/src/main/clojure/clojure/spec/alpha.clj#L22
And this is a "know issue" from clojure.
Aliasing without require may be solved at language-level in some future.
@souenzzo so in my case Iād do (alias 'listing 'app.ui.listing.mutations)
then I could do listing/submit-space-update
?
the issue that could fix this problem is https://clojure.atlassian.net/plugins/servlet/mobile?originPath=%2Fbrowse%2FCLJ-2123#issue/CLJ-2123
I ended up co-located the clj/cljs mutation files so they have the same namespace in the mean time
syntax quote automatically namespace qualifies symbols
are you looking for a shorter way to define or to call the mutation?