Closed (fixed)
Project:
Graph API
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2022 at 20:47 UTC
Updated:
8 Mar 2022 at 11:59 UTC
Jump to comment: Most recent
The module has lots of functions for adding to graphs and changing a graph. These were useful on D7 when the graph was an array with a custom structure, as these functions ensured the array was well-constructed.
Now that we're using graphp/graph, I don't think we need any of these: the Graph object has a well-defined API, and code that assembles or manipulates a graph should use that.
If we wanted to standardize certain attributes, such as 'title' or 'content', then the best thing for that would be to define a wrapper class rather than procedural functions.
Comments
Comment #2
clemens.tolboomExcellent idea.
IIRC graphp/graph has custom attributes.
Comment #3
joachim commented> IIRC graphp/graph has custom attributes.
Yup, you can do $vertex->setAttribute('key-I-made-up', 'some value').
What I mean is that in Graph API we should declare a standard, e.g. the 'title' attribute will be passed to engines to display the the label of a vertex or edge. But that's for another issue.
Comment #5
joachim commented