Graph validity
When you apply a temporal view like at() or latest() to a PersistentGraph, you get a graph view filtered to that point in time. However, this collapses temporal history – property histories only contain the final value, so you can no longer access prior values, and the original earliest_time/latest_time are lost.
The valid() function provides an alternative: it filters out deleted edges without collapsing history. This gives you a graph where traversals and degree calculations exclude deleted edges, while still preserving the full temporal information of the remaining edges – including the complete history of property changes.
valid() on windowed graphs
When applied to a windowed graph, valid() filters out edges that are deleted at the end of the window. An edge is included if it exists at any point during the window, but if it's deleted by the window's end time, it's excluded from the valid view.
Edge validity methods
Individual edges have three methods for checking their status:
| Method | Description |
|---|---|
is_valid() | Returns True if the edge is not deleted at the current view's end time |
is_deleted() | Returns True if the edge is deleted at the current view's end time |
is_active() | Returns True if the edge has any updates within the current window (including deletions) |
Note on is_active(): An edge can be valid but not active. For example, if an edge was added at t=1 and you query a window from t=100 to t=200, the edge has no updates in that window (is_active() = False), but it's still present (is_valid() = True).