The Breadcrumbs plugin enables relationships like those but I don’t think it has this graph feature. You might post this as a feature request on the Breadcrumbs GitHub — altho as I understand it the graph isn’t very open to modification (but maybe context menus for the graph are a different matter).
I am new to the world of Obsidan in general and new to the world of Obsidan plugins development, for a week now I have been messing around with the Obsidan plugin API , I’m now working on my plugin there is little left to publish it, but so far I have no information about modifying context menus.
Since it is “graph” view, not sure what does “son” or “brother” means, which is concept for “tree”, anyway, based on my understanding, implement below, hope it helps for reference, enjoy coding
create context menu as selecting file in the graph view
add new file linked with the selected file
code
based sample plugin in onload of plugin, add follow code
WOW, Your code snippet is absolutely fantastic! It’s exactly what I was looking for, I especially appreciate the video and taking the time to help me out, especially with such a clear and concise explanation. It saved me a lot of time and frustration!.