Skip to content

Neo4j Source#315

Open
danielgerlag wants to merge 7 commits intodrasi-project:mainfrom
danielgerlag:neo4j-source
Open

Neo4j Source#315
danielgerlag wants to merge 7 commits intodrasi-project:mainfrom
danielgerlag:neo4j-source

Conversation

@danielgerlag
Copy link
Contributor

This pull request adds initial support for Neo4j as both a source and bootstrap provider in the Drasi project. It introduces two new plugins—one for streaming Neo4j CDC events and another for bootstrapping graph data from Neo4j—along with their configuration, documentation, and integration into the workspace. The changes include new crates, configuration types, plugin descriptors, and supporting files.

Neo4j Bootstrap Provider Integration:

  • Added the drasi-bootstrap-neo4j crate, which implements a bootstrap provider for loading initial graph data from Neo4j, including configuration types, plugin descriptor, and builder pattern for instantiation. [1] [2] [3] [4]
  • Provided documentation (README.md) and build/test/lint Makefile for the bootstrap provider. [1] [2]

Neo4j CDC Source Plugin Integration:

  • Added the drasi-source-neo4j crate to stream Neo4j CDC events, including configuration types supporting CDC modes, polling, and cursor initialization, with validation and test coverage. [1] [2]
  • Included documentation (README.md) and Makefile for building, testing, and linting the source plugin. [1] [2]

Workspace and Dependency Updates:

  • Registered both new plugins in the workspace, updated the Cargo.toml members list, and added the new crates as dependencies for proper build integration. [1] [2] [3] [4]

Signed-off-by: Daniel Gerlag <[email protected]>
Signed-off-by: Daniel Gerlag <[email protected]>
Signed-off-by: Daniel Gerlag <[email protected]>
Signed-off-by: Daniel Gerlag <[email protected]>
@danielgerlag danielgerlag requested a review from a team as a code owner March 6, 2026 21:30
Signed-off-by: Daniel Gerlag <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces initial Neo4j support in Drasi by adding a Neo4j CDC source plugin and a Neo4j bootstrap provider plugin, plus an end-to-end “getting started” example and workspace wiring.

Changes:

  • Added drasi-source-neo4j for polling db.cdc.query and mapping CDC events into Drasi SourceChanges.
  • Added drasi-bootstrap-neo4j for initial graph load (nodes + relationships) into Drasi’s graph element model.
  • Added a runnable example (examples/lib/neo4j-getting-started) and registered both crates in the workspace.

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/lib/neo4j-getting-started/test-updates.sh Helper script to generate create/update/delete mutations in Neo4j for demo.
examples/lib/neo4j-getting-started/setup.sh Starts Neo4j via Docker Compose, waits for readiness, enables txLogEnrichment, seeds sample data.
examples/lib/neo4j-getting-started/quickstart.sh Convenience wrapper to run setup then cargo run for the example.
examples/lib/neo4j-getting-started/main.rs Example app wiring Neo4j source + bootstrap provider + query + log reaction.
examples/lib/neo4j-getting-started/docker-compose.yml Local Neo4j Enterprise container configuration for the example.
examples/lib/neo4j-getting-started/diagnose.sh Helper diagnostics for container/CDC readiness.
examples/lib/neo4j-getting-started/README.md Example documentation and troubleshooting steps.
examples/lib/neo4j-getting-started/Cargo.toml Example crate manifest (standalone workspace) referencing the new plugins.
components/sources/neo4j/tests/neo4j_helpers.rs Testcontainers-based Neo4j setup helpers + CDC readiness wait.
components/sources/neo4j/tests/mod.rs Test module scaffold.
components/sources/neo4j/tests/integration_tests.rs Ignored integration tests validating bootstrap + CDC CRUD/relationship detection.
components/sources/neo4j/src/mapping.rs Bolt value → Drasi ElementValue mapping utilities + unit tests.
components/sources/neo4j/src/lib.rs Neo4j source implementation (poll loop, cursor persistence, subscription wiring).
components/sources/neo4j/src/descriptor.rs Plugin descriptor + config DTOs + OpenAPI schema export.
components/sources/neo4j/src/config.rs Source config types + validation + unit tests.
components/sources/neo4j/src/cdc.rs CDC selector building, cursor start logic, cursor persistence, CDC event parsing + unit tests.
components/sources/neo4j/README.md Source plugin documentation including CDC requirements and test instructions.
components/sources/neo4j/Makefile Build/test/lint targets for the source crate.
components/sources/neo4j/Cargo.toml Source crate manifest (deps, dev-deps, dynamic-plugin feature).
components/bootstrappers/neo4j/src/neo4j.rs Neo4j bootstrap provider implementation for nodes/relationships.
components/bootstrappers/neo4j/src/lib.rs Bootstrap crate entry + exports + dynamic plugin export.
components/bootstrappers/neo4j/src/descriptor.rs Bootstrap plugin descriptor + config DTO + OpenAPI schema export.
components/bootstrappers/neo4j/src/config.rs Bootstrap config types + validation.
components/bootstrappers/neo4j/README.md Bootstrap provider documentation.
components/bootstrappers/neo4j/Makefile Build/test/lint targets for the bootstrap crate.
components/bootstrappers/neo4j/Cargo.toml Bootstrap crate manifest (deps, dynamic-plugin feature).
Cargo.toml Workspace membership + workspace dependency entries for the new crates.
.gitignore Ignores temp/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Daniel Gerlag <[email protected]>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@danielgerlag danielgerlag self-assigned this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants