pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
lilactown 2021-03-03T04:03:14.041300Z

does pathom handle wildcards in queries?

lilactown 2021-03-03T04:05:10.041900Z

I see some references to it in code but I'm not able to precisely understand the behavior

lilactown 2021-03-03T04:26:26.042500Z

does it just resolve top-level attributes or does it recurse?

wilkerlucio 2021-03-03T15:31:56.043100Z

@lilactown in Pathom, wildcard means "give me everything you loaded so far"

wilkerlucio 2021-03-03T15:33:05.044500Z

its not gonna trigger any extra resolvers, when a resolver is called, the full resolver response is always merged, but later it gets filtered out to include only keys that the user asks, the wildcard removes that filter on that level

wilkerlucio 2021-03-03T15:33:30.045Z

one way you can see all possibilities is using a smart map, if you datafy the smart map you can see all reachable keys

lilactown 2021-03-03T17:15:45.046Z

hmm ok. so a client passing a query like:

[{[:component/id 0] [*]}]
isn't going to be any different than:
[[:component/id 0]]
?

wilkerlucio 2021-03-03T17:22:49.046200Z

correct

wilkerlucio 2021-03-03T17:23:14.046600Z

what may be, is something like: [{[:component/id 0] [:component/some-data *]}]

lilactown 2021-03-03T17:32:17.046800Z

hmm I see

lilactown 2021-03-03T18:07:40.047100Z

that's very helpful. I wrote that down here: https://github.com/lilactown/autonormal/issues/6

wilkerlucio 2021-03-03T18:13:52.048300Z

nice! Im also adding info about this in Pathom docs, I totally missed documenting this