The environment is a map containing contextual information, both from Pathom itself and from any user/library extensions.
In this page you will learn Given the environment is a generic and open map, it makes more sense to talk about what features of Pathom you can see and interact with.
You can always add more things to the environment to suite your own needs.
Native features on environment
This attribute contains the atom with the current entity data. As Pathom processes the graph, new data gets merged into the entity.
You can find helpers to manipulate the entity in the
Indexes should be present in all environments, given they are the center for connect processing
For details on the indexes keys, check the indexes page.
This attribute tells you which is the path of the current run process. It is a vector telling the path from left to right. The following example does a simple demonstration of the path environment attribute.
Contains the current execution plan in progress. You can find more details about the plan graph at the planner page.
The current execution node for the plan. This is useful to get more details from the resolver node run, like the parameters.
This is an optional attribute, when present the planner will cache plans on it.
Here is an example of how to define an environment with a plan cache:
You can also create a shared cache and re-use in different environments: