pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
2021-01-05T00:39:15.084Z

I am getting an exception being thrown in pathom connect when attempting a mutation join with a recursive attribute in the followup query. I put the notes in this gist: https://gist.github.com/dvingo/543cb15d907587f83e41bc07eca217c8 the resolver and query work when not used as a mutation join. I figured I'd post it here first and will open an issue if this is a bug. It's not clear to me that there's anything problematic in the calling code and in the resolver.

Christopher Genovese 2021-01-05T02:46:03.084400Z

Thanks! Here's the resolver:

(defattr all-widgets :widget/all-widgets :ref
  {ao/target     :widget/id
   ::pc/output  [{:widget/all-widgets [:widget/id :widget/a :widget/b]}]
   ::pc/resolve (fn [env _]
                  #?(:clj
                     (if-let [db (get-in env [::mongo/connections :rav :db])]
                       {:widget/all-widgets (mongo/get-widgets db)}
                       (log/error "Cannot find database for rav schema!"))))})

Christopher Genovese 2021-01-05T03:19:23.085200Z

Here I used widget/a and widget/b for the title and description properties listed earlier.