Fork me on GitHub
#pathom
<
2021-03-03
>
lilactown04:03:14

does pathom handle wildcards in queries?

lilactown04:03:10

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

lilactown04:03:26

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

wilkerlucio15:03:56

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

wilkerlucio15:03:05

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

wilkerlucio15:03:30

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

lilactown17:03:45

hmm ok. so a client passing a query like:

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

wilkerlucio17:03:14

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

lilactown18:03:40

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

wilkerlucio18:03:52

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

wilkerlucio18:03:54

New docs for Wildcard usage with EQL interface available at https://pathom3.wsscode.com/docs/eql/#wildcard 🎉

6
👍 6