Open
Conversation
AstraBert
reviewed
Feb 27, 2026
Member
AstraBert
left a comment
There was a problem hiding this comment.
A migration to Neo4J 5 would require:
- Putting Neo4J 5.x as the minimum required version for this integration
- Bumping the integration version (minor or major)
- Making sure there are no other patterns that are no longer supported in Neo4J 5, besides the one addressed in this PR
| CALL (e, row) {{ | ||
| CALL {{ | ||
| WITH e, row | ||
| WITH e, row |
Author
There was a problem hiding this comment.
Because the scope of the CALL and the following WHERE asks for it.
Neo4j 5 minimum is already enforced via dependencies in the integration packages.
All others i will fix
Comment on lines
+498
to
500
| CALL {{ | ||
| WITH e | ||
| WITH e |
AstraBert
approved these changes
Mar 2, 2026
Member
|
Tests are failing, we should fix them before merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes Neo4j 5 compatibility issues in the llama-index-graph-stores-neo4j integration.
Specifically, Neo4j 5 removed support for the legacy subquery syntax:
CALL (e, row) { ... }
and introduced stricter rules for subquery variable importing (e.g., WITH inside CALL {} must only contain simple references).
This change updates all affected Cypher templates to use Neo4j 5–compatible syntax:
Replaces CALL (vars) {} with CALL { WITH vars ... }
Splits importing WITH and filtering WHERE clauses into separate WITH statements to satisfy Neo4j 5 parser constraints
This ensures compatibility with:
neo4j >= 5.16
llama-index-core >= 0.14.x
llama-index-graph-stores-neo4j 0.5.x
Motivation
Users running modern Neo4j 5 installations encountered CypherSyntaxError due to deprecated subquery syntax and stricter scoping rules. Since the package requires Neo4j 5, updating the Cypher templates is necessary for correct operation.
This change resolves runtime failures when:
Inserting nodes with embeddings
Expanding entity relations
Executing subgraph retrieval queries
Issue: #17227
Checklist
Did I fill in the
tool.llamahubsection in thepyproject.tomland provide a detailed README.md for my new integration or package?Version Bump?
Did I bump the version in the
pyproject.tomlfile of the package I am updating? (Except for thellama-index-corepackage)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.
Suggested Checklist:
uv run make format; uv run make lintto appease the lint gods