Skip to content

fix: use keyword arguments for Neo4jGraph initialization (#3906)#6

Open
themavik wants to merge 1 commit intomainfrom
fix/3906-neo4j-database-param-order
Open

fix: use keyword arguments for Neo4jGraph initialization (#3906)#6
themavik wants to merge 1 commit intomainfrom
fix/3906-neo4j-database-param-order

Conversation

@themavik
Copy link
Owner

@themavik themavik commented Feb 9, 2026

Fixes mem0ai#3906.

Root cause: database was passed as the 4th positional arg to Neo4jGraph.__init__, but position 4 is token. This silently used the database value as token while defaulting database to 'neo4j'.

Fix: Use explicit keyword arguments for all parameters.

Root cause: Neo4jGraph.__init__ parameter order is (url, username,
password, token, database, ...) but the code passed database as the
4th positional argument, which maps to the token parameter. This
caused the database value to be silently used as token, while the
actual database defaulted to 'neo4j'.

Fix: Use explicit keyword arguments to ensure each value maps to
the correct parameter regardless of positional order.
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.

Bug:Fix incorrect parameter order in Neo4jGraph initialization in MemoryGraph

1 participant