``` python
from maya import cmds
editor_name = "graphEditor1"
editor_outline_name = editor_name + "OutlineEd"
print(cmds.outlinerEditor(editor_outline_name, q = 1, exists = 1))
objects = cmds.outlinerEditor(editor_outline_name, q = 1, selectionConnection = 1)
print(cmds.selectionConnection(objects, q = 1, object = 1))
```
this is the code may what your need