you should also highlight that your solution has a significant downside: you have to generate the definitions yourself in order for them to be displayed in source graph
this means you’d have to setup a CI/CD to rebuild index each time you make changes to the code + host it on your own
what’s great in GitHub’s approach is they take that obligation away from customers