Create mechanism to query all nodes connected to a requested node

Need a mechanism to determine all other nodes that are connected to a given node.

For a directed graph it should give the option of returning a list of all nodes with edges connected, a list of nodes with edges point to the node in question or a list of nodes that the node in question has edges pointing to.

Edited by Christopher Stryker