Fork me on GitHub
#pathom
<
2020-02-14
>
λustin f(n)04:02:52

In the Pathom visualizer, what are "Attributes with type mismatch"?

wilkerlucio11:02:20

in this context, the different types are scalar vs link, so for example, if one resolver you have something like ::pc/output [{:user/main-address [:address/id]}] it will consider :user/main-address a link, but if later another resolver says ::pc/output [:user/main-address], that's a scalar, now you have a mismatch, because the data should be consistent, the fix is to find the scalar version and declare what comes inside (or change the name in case they are really different things), makes sense?

λustin f(n)18:02:01

Alright. So far, I have lots of maps. I have been sometimes using the link notation to drill deeper into their fields, and sometimes not. Should I be saving the link notation for only cases where the results are a collection of items and perhaps some other uses? I.E. When pulling apart a map, should I always simply do so as a scalar + a separate resolver, instead of sometimes using links?

wilkerlucio23:02:04

the more you can inform to pathom, the better, so on every map, if you can know the structure of, better to express it in the ::pc/output

souenzzo14:02:19

There is a parser plugins that normalizes errors like {:me {:id 1 name ::p/reader-error} ;;=> {::p/error {[:me :name ::p/reader-error]} :me {:id 1}}