manifest / integrations / wp-surreal-db-sync
Surreal Graph Sync
An extendable WordPress Plugin for syncing CMS data to a Surreal database
★ 2stars
7release downloads
0forks
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/dazamate/wp-surreal-db-sync/releases/download/v1.0.2/surreal-graph-sync-v1.0.2.zipFrom the readme
WP → SurrealDB Graph Sync
Maps WordPress data (posts, users, terms) into a graph format for SurrealDB. The plugin is
extended entirely through WordPress filters: you hook a filter, add typed field
objects to the MappedData you're given, and return it.
Field data is defined with typed DTOs (StringField, NumberField, ArrayField, etc…)
collected in a MappedData object. Relations are RelationData objects. The old
['type' = ..., 'value' = ...] array shape is no longer supported — each field is a
strict data parcel that the sync layer validates and renders.
The field objects
All field classes live under Dazamate\SurrealGraphSync\Field:
| Field class | Constructor | Renders as |
|------------------|-----------------------------------------------|----------------------------------|
| StringField | new StringField('hello') | 'hello' |
| NumberField | new NumberField(42) / new NumberField(0.2)| 42 / 0.2 |
| DateTimeField | new DateTimeField('2025-01-02T00:00:00Z') | '...' |
| RecordField | new RecordField(new WordPressId(42, QueryType::POST)) | image:abc…
Read the full README on GitHub →