pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
zilti 2020-07-31T13:07:39.376300Z

What are the reasons that sometimes resolvers are called with nil as param despite there being a key specified that is actually there?

yenda 2020-07-31T14:57:18.384800Z

I am using pathom standalone within a re-frame app, I am reading though fulcro doc because I'd like to improve the way I do data normalization. Currently I parse the server response with defmethods to normalize it into app-db. I am under the impression that fulcro is doing normalization under the hood, does it manage to get normalized response from the pathom server? Is it possible to get that without fulcro? Not getting a deeply nested tree from the pathom parser but a flatter structure instead? for instant in a big query that ask for a list of user items, get the users details at the same level as the items details, so that when multiple items belong to a single user, the user and his details are only present once in the response, while the item only contains the user id

wilkerlucio 2020-07-31T16:00:20.385200Z

can you make a small demo case?

wilkerlucio 2020-07-31T16:02:33.388700Z

normalization is done by Fulcro, pathom plays no part in it, Fulcro does this by annotating each query fragment (on meta data) with the component that requested it, then fulcro walks the query, computing the identity of each part of the response (this is what the ident thing is about)

yenda 2020-07-31T16:33:15.388900Z

So there is no normalization server side?

2020-07-31T16:39:23.389100Z

The response is not normalized on the server, no.

2020-07-31T16:44:12.389300Z

That said, nothing is stopping you from implementing an endpoint which normalizes pathom results before sending them to the client. No doubt there would be pitfalls, but I'm not sure offhand what they might be.

zilti 2020-07-31T17:08:22.389500Z

I'll try to. This happens inside Fulcro though and I don't know what exactly is going on behind the scenes there