Edges / documents created using the regular collection API do not know about each other, especially if you save an edge, it does not check if their source and target vertices exist, it is just verified that the collections are valid.
If you save documents / edges using the gharial or general-graph module (which is used by the gharial module), you get guarantees over your schedule. This includes the following:
- Saving edges verifies that the source and target vertices exist and are valid (adapting to the definition of the base relation)
- Removing a vertex triggers a cascade to remove all connected edges known to any graph.
This gives the advantage that you do not have free ends or orphan edges in your schedule, which is often required.
The internal memory of the edges remains untouched by gharial, so if you save the edge with gharial, you can access it using the regular document API and vice versa. However, only persistence through gharial gives the above guarantees.
source share