Fork me on GitHub
#pathom
<
2022-05-07
>
dvingo14:05:52

hey @wilkerlucio i'm trying to integrate a pathom3 parser/fulcro remote with the latest pathom viz - any pointers on how to augment either my env or which resolvers to add to get things working? I only see the remote version for use with the standalone app should I be looking in this ns? https://github.com/wilkerlucio/pathom-viz-connector/blob/master/src/com/wsscode/pathom/viz/ws_connector/pathom3.cljc I see (pci/register env p.connector/request-snapshots) but I don't think that's everything

👍 1
wilkerlucio12:05:25

thanks, sorry I haven't stopped to check it yet, but its on my todo list

dvingo14:05:13

all good! saw you online the other day and was hoping to catch you 🙂 I'd be interested in bringing over all the pathom-viz views into the inspector. I'll keep digging in in the meantime to see if I can make some progress.

wilkerlucio15:05:21

the recent versions of Pathom Viz already use Fulcro 3, it just need some analisys to get it all together

dvingo18:05:52

I see now, I need to pass the map through this transformation pipeline: https://github.com/wilkerlucio/pathom-viz/blob/bf9126438c9fc9cf7d96367cefc0713ef4643fc2/src/core/com/wsscode/pathom/viz/index_explorer.cljs#L1372 I am struggling to make that happen. The relevant data is coming in to the inspector UI here: https://github.com/dvingo/fulcro-inspect/blob/ae370974c9aa599640a07355c3c26ca830550258/src/ui/fulcro/inspect/ui/index_explorer.cljs#L129 and I'm trying this:

(defn clean-indexes [indexes]
  (let [indexes (dissoc indexes
                  :com.wsscode.pathom3.connect.indexes/index-mutations
                  :com.wsscode.pathom3.connect.indexes/index-resolvers)
        indexes (p/elide-special-outputs indexes)
        indexes (p.eql/satisfy adapt/env indexes [:com.wsscode.pathom.connect/indexes])]
    indexes))

(defn clean-explorer [explorer]
  (-> explorer
    (update ::iex/index clean-indexes)
    (update ::iex/idx clean-indexes)))
it's a hack that's not working. anyway, going to take a break. It may be faster for you to install the extension yourself: https://github.com/dvingo/fulcro-inspect