kc0bfv / relationship_graph

A graph building tool to nicely demonstrate arbitrary relationships.
GNU General Public License v3.0
0 stars 0 forks source link

Link node and edge properties to a global def instead of per item #5

Closed kc0bfv closed 1 year ago

kc0bfv commented 1 year ago

Currently I think it's set so that each edge name is stored on the edge itself. That makes changing all edges of a certain type from one name to another very difficult. Instead, have the edges reference back to a central definition so that can be changed. I don't remember how node type is defined, but do the same for that. Remember to implement this in a way that doesn't break existing edges and nodes (make the "type" field optional, and the default for new graphs, and preferentially use it, and maybe update old nodes/edges automatically).

kc0bfv commented 1 year ago

Edge stored a type on it, so I just changed code to pull the name from the schema. Nodes already worked this way.