Skip to content

fix: CoordiNode Cypher compatibility bugs in langchain and llama-index adapters #14

@polaz

Description

@polaz

Problem

E2E testing against v0.4.3 revealed four compatibility bugs discovered by running the README examples against a live CoordiNode instance:

langchain-coordinode

  1. add_graph_documents() not implemented — inherited pass from GraphStore base, all graph data silently discarded
  2. refresh_schema() uses unsupported Cypher functionslabels(n) and type(r) both return null in CoordiNode; must use n.__label__ and r.__type__ internal properties

llama-index-graph-stores-coordinode

  1. upsert_relations() uses unsupported MERGE syntaxMERGE (src)-[r:TYPE]->(dst) fails with "MERGE create from non-NodeScan pattern"; replaced with MATCH+MATCH+CREATE
  2. get_triplets() / get_rel_map() use type(r) — returns null; must use r.__type__

Fix

  • Implement add_graph_documents() in CoordinodeGraph with MERGE nodes + CREATE edges (with fallback for servers that don't support WHERE NOT pattern guards)
  • Replace all labels(n), type(r) with n.__label__, r.__type__
  • Replace MERGE edge pattern with MATCH+CREATE in upsert_relations()

Verification

All 15 e2e tests pass after the fix (core connect, langchain schema/query/add_graph_documents, llama-index upsert/get_triplets/structured_query/from_existing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions