I found what I was looking for:
var graphic = app.selection;
Just bear in mind that that code could prodce a non-filePath if the graphic doesn't have an itemLink or if the itemLink is in a bad state (I've not checked but I think there are cases where changing you code to the post to the temptingly simple:
myFile = File(graphic.itemLink.filePath());
could cause an error or could result in something that looks like a file but isn't.
Just be cautious.
Usually, when I'm writing link-centric code, I normally start with the Links collection rather than the objects that might or might not have itemLinks -- at the very least it saves processing time and it also makes it a lot easier to find them.
Well done finding the original answer.