Graph-Document Sync

Define sync rules to automatically keep graph nodes and document collections in sync. Changes propagate bidirectionally within the same transaction.

Define a Sync Rule

SYNC LABEL Person TO COLLECTION persons KEY name INCLUDE name, email, age

Now creating a :Person node auto-creates a document in persons, and vice versa. The INCLUDE clause controls which fields sync.

Manage Sync Rules

-- List all sync rules
SHOW SYNC RULES

-- Drop a rule by ID
DROP SYNC RULE 1

Options

OptionDescription
KEY propertyNode property used as document key
INCLUDE prop1, prop2Fields to sync (empty = all)
SKIP TRIGGERSSync writes don't fire triggers on the target