pathom

caleb.macdonaldblack 2023-02-13T17:26:04.827079Z

Should this work? Am I missing something?

2023-02-13T21:23:21.653329Z

Im not an expert, but maybe :pco/input needs to be a vector? [:acme/feed]. And the nested map would go to the resolve function.

wilkerlucio 2023-02-13T22:02:09.429529Z

I never tried union as an input for a resolver, there might be some issue there

wilkerlucio 2023-02-13T22:03:05.823179Z

on a quick look at the resolver it already looks off:

#com.wsscode.pathom3.connect.operation.Resolver{:config #:com.wsscode.pathom3.connect.operation{:input [#:acme{:feed {: [:],
                                                                                                                      : [:
                                                                                                                                   :,
                                                                                                                      :acme.video/id [:acme.video/title]}}],
                                                                                                :provides {:foobar {}},
                                                                                                :op-name foobar,
                                                                                                :output [:foobar],
                                                                                                :requires #:acme{:feed {nil {nil #:acme.video{:title {}}}}}},
                                                :resolve #object[repro_caleb$eval56069$fn__56070
                                                                 0x69b15a88
                                                                 "repro_caleb$eval56069$fn__56070@69b15a88"]}

wilkerlucio 2023-02-13T22:03:18.145929Z

see the :requires, it has some nils over the place

caleb.macdonaldblack 2023-02-13T23:14:31.757349Z

@wilkerlucio Thanks for looking into that. Do you know whether or not there is any point specifying unions queries as outputs?

caleb.macdonaldblack 2023-02-13T23:18:15.242919Z

@jeroenvandijk Thanks for jumping in to help out. Pathom3 supports EQL queries with union syntax and I’m trying to use that syntax in the input. It looks odd but, but the map-within-map is valid when used with p.eql/process https://pathom3.wsscode.com/docs/eql/#union-queries

🙌 1
😅 1
caleb.macdonaldblack 2023-02-13T23:18:45.727599Z

Looks like it’s not supported in the input however.

wilkerlucio 2023-02-13T23:19:02.832209Z

on the output it does handle properly, but I don't remember actually trying it

caleb.macdonaldblack 2023-02-13T23:19:17.879499Z

I’ve used it on outputs for a while now and haven’t noticed anything odd

wilkerlucio 2023-02-13T23:19:30.462719Z

the thing is that the input is using a specialized function to generate the shape descriptor (while output uses the default query->shape-descriptor, which supports unions)

wilkerlucio 2023-02-13T23:22:54.181919Z

because the input shape descriptor generator has also the job of separating the optionals

Panel 2023-02-13T23:19:36.369139Z

Is it possible to add custom planner rules in user space ? I wrote a rule to merge sibling with same run-next in a fork.

wilkerlucio 2023-02-13T23:20:27.868279Z

not yet, but that's something I think could be useful, its easy to add an extension point, maybe one after the graph is ready could be a start?

wilkerlucio 2023-02-13T23:20:53.103619Z

altough, if you found some generic way that could be used in general, I would rather include it in the library

Panel 2023-02-13T23:24:03.273729Z

I just implemented what you suggested in another thread, merging sibling with same run-next. Solve my issues but need to run more test to see if it’s not breaking anything

wilkerlucio 2023-02-13T23:24:58.284329Z

but I'm happy to learn you are figuring it out, its great to have more people getting familiar with those internals 🙂

👍 1
wilkerlucio 2023-02-13T23:25:51.188609Z

set the channel topic: pathom https://pathom3.wsscode.com & https://github.com/wilkerlucio/pathom/ & https://roamresearch.com/#/app/wsscode

wilkerlucio 2023-02-13T23:26:07.344039Z

set the channel topic: pathom https://pathom3.wsscode.com & https://github.com/wilkerlucio/pathom/