How to write a GraphQL query to get the contributor insights for a repository

I’d like to make a query that returns the user stats for a repo ina similar way that the insights tab does:

:wave: Hey there @ArsalaBangash––welcome to the GitHub Support Community!

The data that’s rendered in the Insights tab is not currently accessible by the REST API nor the GraphQL API. However, I suggest checking out the Repository Statistics API as a way of obtaining data related to repository activity.

Does that help? :thought_balloon:

I ended up scraping from the Insights Pulse and contributors page.