Fork me on GitHub
#pathom
<
2020-07-31
>
zilti13:07:39

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

wilkerlucio16:07:20

can you make a small demo case?

zilti17:07:22

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

yenda14:07:18

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

wilkerlucio16:07:33

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)

yenda16:07:15

So there is no normalization server side?

codonnell16:07:23

The response is not normalized on the server, no.

codonnell16:07:12

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.