Skip to content

Upcoming breaking GrandCypher API change #909

@j6k4m8

Description

@j6k4m8

Hi @davidmezzetti and team! The GrandCypher API is changing to make it more compatible with the Cypher standard, so I'm reaching out to the biggest stakeholders in the project to give a quick heads-up! Per aplbrain/grand-cypher#73, the RETURN value of Nodes will now be the dictionary value, instead of the ID:

G = nx.DiGraph()
G.add_node("x", foo="bar")

OLD:

MATCH (A) RETURN A
#→ {"A": ["x"]}

NEW:

MATCH (A) RETURN A
#→ {"A": [{"foo": "bar"]}

You can still achieve the old GrandCypher node-ID behavior with the (now spec-compatible) ID function:

NEW:

MATCH (A) RETURN ID(A)
#→ {"ID(A)": ["x"]}

It looks to me like this is only going to impact this Query codepath, for which there is already an abstraction class that might be able to "smooth over" the change for existing users;


Because this is an API-breaker, my plan is to roll the major semver on GrandCypher; this will roll out in the major-version update v1.0.0, since I want it to be clear to all importing libraries that this is a significant change. So no action needed, as long as you're pinned to the v0.* releases.

Happy to chat more about it!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions