Page MenuHomePhorge

Using Edges
Phorge Contributor Documentation (Developer Guides)

Guide to the Edges infrastructure.

Overview

Edges are a generic way of storing a relationship between two objects (like a Task and its attached files).

An edge is defined by a source PHID (the edge origin), a destination PHID (the edge destination) and an edge type (which describes the relationship, like "is subscribed to" or "has attached file").

Every edge is directional, and stored alongside the source object. Some edges are configured to automatically write an inverse edge, effectively building a bidirectional relationship. The strength of storing relationships like this is that they work when databases are partitioned or sharded.

Reading Edges

You can load edges with PhabricatorEdgeQuery.

Writing Edges

You can edit edges with PhabricatorEdgeEditor.

Edges and Lisk

PhabricatorLiskDAO includes some builtin support for edges.