Fork me on GitHub
#pathom
<
2021-10-22
>
dehli14:10:32

Good morning! Is this behavior expected in pathom3 (where the same keyword returns different values based on other keys you ask for)? I can see that it’s b/c the :node/index key takes :node/parent as its input but it’s unexpected (to me) that those extra keys would leak through to the response. https://github.com/dehli/pathom-edge-cases/blob/e3cc7d39db4ee10aa654d018d65193adce06b6de/pathom3/extra-keys/main/src/dev/dehli/pathom3/extra_keys.clj#L33-L45

wilkerlucio15:10:30

this is expected because you are not specifying the details of :node/parent, so it gets everything

wilkerlucio15:10:57

I think you may want to use a recursive query there, in which case it would liimt the results

wilkerlucio15:10:23

like:

(p.eql/process env {:node/id 1} [:node/id {:node/parent ['...]}])

dehli15:10:16

okay, that makes sense. i’ll need to think through how to restrict asking for :node/parent without sub keys since best practice would be to always specify all the requested keys (so that internal values won’t get returned)

Drew Verlee21:10:59

In Phatom3, is there a way to see all the attributes reachable given a input? I'm using PathomViz and the index explorer > provides view only seems to show the next node.

Reily Siegel23:10:16

Try com.wsscode.pathom3.connect.indexes/reachable-paths

wilkerlucio00:10:21

I recently noted a bug on the attribute indexing, it may be it, its related to nested atrributes, they are not getting pulled out

wilkerlucio00:10:28

but also on the UI, there is the depth choice, by default the graph view only shows 1 depth

wilkerlucio00:10:36

but you can click to increase

wilkerlucio00:10:20

can you make a small case of what you see/miss? just wanna make sure its the same thing or a possible new issue