Fork me on GitHub
#om
<
2018-04-29
>
danielstockton19:04:12

Automatic normalization requires the root query to match the structure of the response. Can anyone with a good understanding of compassus point of where the actual root query is swapped out for the 'route query' for the purposes of normalization? https://github.com/compassus/compassus/blob/master/src/main/compassus/core.cljc

danielstockton19:04:28

This looks like it does it when the app mounts. Is there somewhere else that does this when merging from remote?

danielstockton19:04:26

I tried doing a tree->db in merge, but i ended up with just the lookup table of idents (lost the actual data)

anmonteiro19:04:01

looks like you want to use compassus-merge as your merge function, perhaps?

anmonteiro19:04:21

or you need to pass the query in to the callback in your send function

danielstockton19:04:45

I'm actually trying to build the routing from scratch (using union query method like compassus) to understand the magic better. I think you're right though, I missed the multi-arity nature of send cb and the response is also keyed under the route. Thanks a lot, think I can progress from here.