Fork me on GitHub
Drew Verlee20:11:51

can some explain (re-explain) how the role of the "entity" or "entity tree" the 2nd optional arg passed to p.eql/process From here It says it can provide data to the entity map, this would seem to be useful in testing and there is a NS for helpers on merging data in But their not well documented (from my limited perspective). And i don't see any examples. I have been randomly throwing data in this entity-tree in hopes it would somehow show up in my tests. But a graph needs entity-attribute-value relationships and a "map" can't do that, which is where i assume the helpers come in?


hello @U0DJ4T5U1, the entity is the initial data context, in the past Pathom made easy to provide a single attribute to start the processing (usually some id) via idents. the entity is the idea to extend that, and support an arbitrary bag of data to be available at hte process start, so pathom can fill the rest using this data as the bootstrap data


another way to say it: the entity is the data you already know before you start resolving


the one in env is the cached entity so far, that value is an atom that starts with the entity (that you provide to process), but changes as attributes get resolved

👀 1
Drew Verlee23:11:14

It does make sense, it might help to post a couple examples of working with it using the helper functions to get a sense of whats possible. As it stands, i just assoc keys and values directly into it.