Skip to content

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

@jhurliman

Description

@jhurliman

Summary

graphiti passes Cypher parameters under a params kwarg (the convention the Neo4j driver implements). For example search_utils.node_similarity_search (run during add_episode entity dedup):

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

Neo4jDriver.execute_query pops params and uses it as the query parameters:

params = kwargs.pop('params', None) or {}
...
await self.client.execute_query(cypher_query_, parameters_=params, **kwargs)

NeptuneDriver.execute_query instead does params = dict(kwargs), which nests the real filter params (e.g. $group_ids) under a literal "params" key. Neptune then never sees $group_ids and raises:

MalformedQueryException ... MissingParameter

This breaks every add_episode (entity dedup always runs node_similarity_search).

Fix

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

Environment: graphiti-core 0.29.2, Amazon Neptune Serverless (neptune-db://) + OpenSearch Serverless.

PR: fixes this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions