In conventional Graph Theory the role of Nodes and Edges is skewed: nodes are perfectly ok being aloof, but poor edges are always drawn between existing nodes (that is, the two maps from EDGES to NODES are total).

Now, I am curious to know if there is somewhere in the Mare Magnum of mathematics an extension of Graph Theory, let us call it provisionally the Theory Partial Graphs (it may have already a well-established name, in which case I apologize), which contemplates dangling edges (ie edges which either stand alone, or are attached only to one node).

To be more specific, I would like to see some refs on TYPED partial graphs: dangling edges hare equipped with types, and there is an algebra of sorts which tells which dangling nodes can "merge" with other kindred typed dangling nodes to make up a genuine edge of the graph

(think of nodes which protrude some edges like an octopus, with the possibility of two arms joining and forming a perfectly traditional edge).

Anything along the lines above?

PS Although I do not have any specific preconceptions around the way this theory may appear (for instance, as some kind of algebra, or as a chapter of topology), ideally it would be codes within a categorical framework