Sorry—I thought you were referring to the regular graph view, not the local one. I can’t get the group filters “path,” “file,” or “tag” to work for the local graph filter either, so I created a bug report:
Even if my suggestion worked, you would have to change the path every time you switched files. You can create a feature request asking for the devs to add the feature you are looking for.