Skip to content

fix(neptune): honor the params kwarg in execute_query (fix MissingParameter)#4

Closed
jhurliman wants to merge 1 commit into
mainfrom
fix/neptune-execute-query-params
Closed

fix(neptune): honor the params kwarg in execute_query (fix MissingParameter)#4
jhurliman wants to merge 1 commit into
mainfrom
fix/neptune-execute-query-params

Conversation

@jhurliman

Copy link
Copy Markdown
Owner

Closes #2.

graphiti passes Cypher parameters under a params kwarg (the convention Neo4jDriver.execute_query implements by popping params). NeptuneDriver.execute_query did params = dict(kwargs), nesting the real filter params (e.g. $group_ids from search_utils.node_similarity_search) under a literal "params" key → Neptune MalformedQueryException: MissingParameter on every add_episode (entity dedup runs node_similarity_search).

This pops params and merges it to the top level (mirroring the Neo4j driver), preserving the other control kwargs.

Verified against Amazon Neptune Serverless + OpenSearch Serverless (graphiti-core 0.29.2): with this plus #1, add_episode/search succeed end-to-end.

…gParameter)

graphiti calls drivers with the Cypher parameters under a `params` kwarg, e.g.
search_utils.node_similarity_search:

    await driver.execute_query(query, params=filter_params, search_vector=...,
                               limit=..., min_score=..., routing_='r')

Neo4jDriver.execute_query pops `params` and uses it as the query parameters.
NeptuneDriver.execute_query instead did `params = dict(kwargs)`, nesting the real
filter params (e.g. `$group_ids`) under a literal `"params"` key, so Neptune
never sees `$group_ids` and raises:

    MalformedQueryException ... MissingParameter

This breaks every add_episode (entity dedup runs node_similarity_search).

Pop `params` and merge it to the top level (mirroring the Neo4j driver),
preserving the other control kwargs.
@jhurliman

Copy link
Copy Markdown
Owner Author

Closing as redundant — upstream getzep/graphiti already covers this: PR getzep#1539 fixes both Neptune bugs (uninitialized _database + execute_query param nesting), and getzep#1568 fixes the params half. Tracking issue: getzep#1529 (added a current-main + Neptune Serverless validation comment there).

@jhurliman jhurliman closed this Jun 15, 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.

NeptuneDriver.execute_query ignores the params kwarg → Neptune MissingParameter on add_episode

1 participant