Fork me on GitHub
#pathom
<
2020-10-19
>
njj20:10:02

Is there anyway to avoid full paths to mutations?

njj20:10:04

(pc/defmutation submit-space-update [env inputs]
  {::pc/sym `app.ui.listing.mutations/submit-space-update}
  (log/info "Submit space" inputs))

njj20:10:42

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

wilkerlucio21:10:07

are you looking for a shorter way to define or to call the mutation?

njj11:10:05

@U066U8JQJ I’m looking for a way to not have the long full path to the client side mutation

souenzzo12:10:58

@U010LFZGFEG 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.

njj12:10:59

@U2J4FRT2T so in my case I’d do (alias 'listing 'app.ui.listing.mutations)

njj12:10:07

then I could do listing/submit-space-update?

👍 3
njj13:10:09

I ended up co-located the clj/cljs mutation files so they have the same namespace in the mean time

nivekuil20:10:37

syntax quote automatically namespace qualifies symbols