Problem Statement
The project uses github.com/neo4j/neo4j-go-driver/v4 v4.4.8 (see go.mod:15). Driver v4 doesn't support the native vector index or newer Bolt protocol features in Neo4j 5.x. v5's API replaces neo4j.NewDriver, Session, session.Run with context-aware equivalents (neo4j.NewDriverWithContext, SessionWithContext, ExecuteRead/ExecuteWrite).
Proposed Solution
- Bump
github.com/neo4j/neo4j-go-driver/v4 to v5 in go.mod.
- Update all call sites in:
internal/domain/repositories/neo4j/client.go
internal/infrastructure/persistence/neo4j/repository.go
internal/application/bootstrap/bootstrap.go
internal/application/services/migration/migration.go
internal/tests/integration/transform_service_test.go
- Move from
Session/Run to SessionWithContext/ExecuteRead/ExecuteWrite, propagating context.Context through the repository/service layers (DDD ports).
- Verify transaction retry logic and error handling match the new API.
Alternative Solutions
Stay on v4 and implement vector search outside Neo4j — rejected, see the "Upgrade Neo4j server from 4.4 to 5.13+" issue.
Use Case
Required step to use Neo4j 5.x's native vector index, and to stay on a driver version that still receives new features.
Priority Level
Important
Implementation Ideas
- Migrate layer by layer:
client.go first (lowest level), then repository.go, then bootstrap.go and migration.go.
- Add a
context.Context parameter to existing ports in internal/application/ports/ if not already present.
- Run
internal/tests/integration/transform_service_test.go against the Neo4j 5.13+ instance from the server upgrade issue.
Additional Context
Depends on: "Upgrade Neo4j server from 4.4 to 5.13+" (needs a Neo4j 5.x test environment available).
Problem Statement
The project uses
github.com/neo4j/neo4j-go-driver/v4 v4.4.8(seego.mod:15). Driver v4 doesn't support the native vector index or newer Bolt protocol features in Neo4j 5.x. v5's API replacesneo4j.NewDriver,Session,session.Runwith context-aware equivalents (neo4j.NewDriverWithContext,SessionWithContext,ExecuteRead/ExecuteWrite).Proposed Solution
github.com/neo4j/neo4j-go-driver/v4tov5ingo.mod.internal/domain/repositories/neo4j/client.gointernal/infrastructure/persistence/neo4j/repository.gointernal/application/bootstrap/bootstrap.gointernal/application/services/migration/migration.gointernal/tests/integration/transform_service_test.goSession/RuntoSessionWithContext/ExecuteRead/ExecuteWrite, propagatingcontext.Contextthrough the repository/service layers (DDD ports).Alternative Solutions
Stay on v4 and implement vector search outside Neo4j — rejected, see the "Upgrade Neo4j server from 4.4 to 5.13+" issue.
Use Case
Required step to use Neo4j 5.x's native vector index, and to stay on a driver version that still receives new features.
Priority Level
Important
Implementation Ideas
client.gofirst (lowest level), thenrepository.go, thenbootstrap.goandmigration.go.context.Contextparameter to existing ports ininternal/application/ports/if not already present.internal/tests/integration/transform_service_test.goagainst the Neo4j 5.13+ instance from the server upgrade issue.Additional Context
Depends on: "Upgrade Neo4j server from 4.4 to 5.13+" (needs a Neo4j 5.x test environment available).