pathom

sheluchin 2024-02-23T17:54:53.425099Z

(pco/defresolver items
  []
  {::pco/output [{:items [:item/id]}]}
  {:items [{:item/id 1}
           {:item/id 2}]})
                                           
(pco/defresolver item
  [{:item/keys [id]}]
  {::pco/output [:item/name]}
  {:item/name (str "name: " id)})
                                           
(p.eql/process
  (-> {}
      (pci/register [items item])
      (p.connector/connect-env "fiddles"))
  [:items])))
Why is it that when I look at the graph in viz, there is no connection between :items and :item/id? My expectation is that there should be because the items resolver's ::pco/output (and return value shape) both include :item/id. In the screenshot, the red node is :items while the green one is item/id.

wilkerlucio 2024-02-23T17:55:56.133169Z

because they are a nested relationship, those aren't visually mapped in Pathom Viz, only sibling connections (like :item/id -> :item/name) are considered there

sheluchin 2024-02-23T17:58:47.987019Z

Shouldn't they show up in in Viz when you are looking at the graph view for :items and select Nested Outputs?

wilkerlucio 2024-02-23T17:59:52.882009Z

sorry, its been a long time, my guess is that you might be able to see in this view, but not in the full graph, those appear in this particular view? or not even there?

wilkerlucio 2024-02-23T18:00:06.193589Z

could also be a bug, something missing to port (this view is quite old, from Pathom 2 times)

sheluchin 2024-02-23T18:02:41.366779Z

Nope, :item/id is not in the :items graph view at all. It does show up when looking at the fiddles.pathom/items resolver graph, but not the attribute graph. There's still no connection between :items->`:item/id` in the resolver graph, though.

sheluchin 2024-02-23T18:04:11.355939Z

I understand your point about only sibling relationships being represented in the full graph. My question here is: is this indicative of a problem in my resolvers that should be addressed, or is that just the way it is and not an issue?

wilkerlucio 2024-02-23T18:43:30.158089Z

just the way the viz is, your resolver is fine

sheluchin 2024-02-23T18:51:06.493989Z

Perfect, thanks @wilkerlucio!