3.11 A bridge reachable only through another virtual node (staged re-planning)
MATCH (o:HubSpotOwner)-[:OWNS_CONTACT]->(c:HubSpotContact)<-[:HAS_HUBSPOT_CONTACT]-(p:Person)-[:HAS_GITHUB]->(g:GitHubIdentity)-[:RAISED]->(i:GitHubIssue)WHERE o.email = 'me@example.com'RETURN p.name, i.titleMeans: “For the contacts I own in HubSpot, which of those people are on GitHub, and what
issues did they raise?” The GitHub anchor p is reachable only through a virtual node (c),
which doesn’t exist until HubSpot is fetched.
How it executes — in waves:
- Wave 1. Only
ois bound (by the literal email). Materializec(the owned contacts) fromo. Nowcis real for this transaction. - Wave 2. With
creal, the closure extends through it top(the canonical Person behind each contact) —pis now bound. Resolve theHAS_GITHUBbridge for those people → materializeg. - Wave 3. With
greal, materializei(their issues). - Run / roll back over the fully-assembled graph.
The engine re-plans after each wave, treating everything materialized so far as real, until no new virtual node becomes reachable (a fixpoint, bounded by a stage cap). You write one query; the engine discovers the dependency order.

