pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
souenzzo 2020-10-07T00:51:04.048400Z

@austin021 I work on a internal library that allow you to describe pages from EQL queries, using SSR generated pages Also render mutations as forms etc...

souenzzo 2020-10-07T00:52:07.048500Z

if you are interested on something like it let me know. then I will try to port it out from my internal project

mruzekw 2020-10-07T01:27:04.050500Z

@austin021 You could setup a GraphQL backend and front it with a Pathom instance where you want to use ClojureScript with. It’s also possible to only use the DB/network layer of Fulcro as seen in this video with Fulcro + Re-frame: https://www.youtube.com/watch?v=ng-wxe0PBEg

nivekuil 2020-10-07T06:26:04.051200Z

has anyone found a reason to not use elide-special-outputs-plugin?

souenzzo 2020-10-07T12:23:28.051400Z

many pathom behaviors are "historical"

souenzzo 2020-10-07T12:24:29.051600Z

and the approach is never break what is working. If someone did a application using ::p/not-found, it still works But every new pathom app should use this plugin

markaddleman 2020-10-07T15:57:02.065300Z

I'm wondering if I'm doing something wrong. I'm integrating Pathom into an existing application which has its own notion of keys for data. It's pretty straightforward to encode the existing application keys into idents. For example, here is an ident for an "event":

[:application.event/id
          {:application/id {:appKey "vI7INwaYRrmRg20PrWM1UQ", :portfolio/id {:portfolioKey "Z8X06QFpRXiu7BCyBg2xOg"}},
           :event          "Back to Start"}]
The resolvers which retrieve data from our physical stores need different bits from the idents. For example, my resolver to retrieve "event attributes" looks like this:
(pc/defresolver application-event-attributes [env input]
  {::pc/input  #{:portfolioKey :appKey :event}
   ::pc/output [{:application.event/attributes [...]}]}
  {:application.event/attributes ...})
Note the physical resolver doesn't take :application.event/id directly. My idents are basically hierarchically nested structures that serve as keys into application data. In our domain, portfolios have applications, applications have events and event have attributes. So, an event ident nests the application ident and the application ident nests the portfolio ident. Following this pattern, an event attribute ident nests the event ident, blah blah... To make this work, I end up writing a bunch of resolvers that explain to Pathom how to decompose my idents. So, I have a bunch of resolvers that look like this:
(pc/defresolver application-event-id->application-id-and-event [env {:application.event/keys [id]}]
  {::pc/input  #{:application.event/id}
   ::pc/output [:event :application/id]}
  id)
Is it common to take a nesting approach to idents? Does Pathom have a more direct way of understanding the idents structures so I don't have to write a bunch of these decomposing resolvers? Am I fundamentally approaching this the wrong way?