davidhstocker / Graphyne

Graphyne is a smart graph - a property graph capable to actively reacting to changes and incorporating decision making logic, written in Python. It is designed to be easy to integrate into your Python projects, simple to use and very powerful. It uses Memetic as its graph definition and query language. It is capable of running with or without persistence.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

addEntityLink needs to have parameter order changed

davidhstocker opened this issue · comments

addEntityLink takes four parameters, two mandatory and two optional. entityUUID1 and entityUUID2 are mandatory. linkType is the third positional and the first optional. linkAttributes is the fourth positional and second optional.

linkType is a bit esoteric and its use case might not be a real world one. That is, I set up members of an entity in a schema with a subatomic link. They are visible when directly traversing from any of the entities created in this cluster, but the subatomic links are not traversed when travelling from the outside. They are effectively invisible to the rest of the graph.

This use case might be useful, sometime. linkAttributes are useful very often. It is poor API UX to have a (presumptively) commonly used optional parameter behind a rarely used one. The positions of these two need to be swapped, so that the order is:

entityUUID1, entityUUID2, linkAttributes, linkType