I’m creating a graph with many nodes where each node can represent one of many types of things. 5 cat nodes, 30 dog nodes, 40 people nodes, etc…
I’m currently assigning a ‘node_type’ attribute to each node and filtering over all nodes to collect nodes of a given type. I have to do this operation a lot and it feels very expensive and wrong. I’ve looked into bipartite graphs but they only support two groupings of nodes.
What is the best, most efficient way to organize and collect nodes of a given type?
I’ve looked at similar questions but this use case seems too common for a full graph search to be the correct answer.