graph.getConnectedLinks(element, opt)

Get all the associated links to the element. If opt.inbound === true, only inbound links will be returned. Similarly, if opt.outbound === true, only outbound links will be returned. If opt.deep is true, all the links that are connected to any of the descendant elements (embedded and deeply embedded) are returned.