pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
wilkerlucio 2021-05-13T01:48:56.314200Z

https://github.com/wilkerlucio/pathom3/issues/49

wilkerlucio 2021-05-13T01:49:35.314500Z

https://github.com/wilkerlucio/pathom3/pull/51

1
2021-05-13T03:10:19.314800Z

Apologies for the delay, here is what gets logged right now

2021-05-13T03:10:50.315200Z

as you can see it goes on for a while so I just clear my console then execute the resolver

2021-05-13T09:44:47.315600Z

i can confirm it works as expected now 🙂 thanks a lot!

wilkerlucio 2021-05-13T16:19:23.315900Z

@royalaid version 2021.05.13 of pathom-viz-connector now logs with Timbre, so you can configure it

1🙌
paul931224 2021-05-13T22:34:46.319700Z

Hello everybody! I am using Pathom for a while now, it is fascinating, simplified my backend and frontend also. Now I try to do a file uploading example, but got myself in trouble.

(defmutation upload-files
  [env data]
  {::pco/op-name 'files/upload-files}
  (let [{:keys [directory-id files]} data]
    (println "Directory: " directory-id)
    "return"))

(p.eql/process
  env
  [`(files/upload-files {:directory-id directory-id})])
In the mutation the directory-id stays a symbol. I tried to (eval directory-id), but it didn't work. Also tried to expand my env with :
(def env
  (-> (pci/register registry)
      (p.plugin/register pbip/mutation-resolve-params)))
What should I do to make my params evaluate? I destructure them from the request.

souenzzo 2021-05-13T22:46:56.321Z

@paul931224 not a pathom issue, but an clojure-unquote issue. But file uploads may be a bit annoying to handle You are using fulcro? pedestal?

(p.eql/process
  env
  [`(files/upload-files ~{:directory-id directory-id})])

1👍
paul931224 2021-05-13T22:52:44.324Z

Thank you so much @souenzzo, I never had to use quote and eval in 6 years of clojure programming. Seems so easy now and trivial. We don't use nothing fancy like that, I get my files from multipart-params using ring . I made a route only for uploading the files, but wanted to do it with mutation . I have the files and everything, that was the last missing piece.

1👍