Note: Using CSWP with the Office Graph has to be done in SPO, and is not available on-premises (except perhaps using hybrid which I haven't tested)
If you have ever looked into the web part definition of a content search web part you might have noticed the DataProviderJSON property, and inside of that property you can find the Properties and PropertiesJSON properties (that’s almost inception for you).
I have highlighted the important sections in yellow and green and pay attention to the double escaping in the PropertiesJSON property. I have also set the Office Graph rank model GUID which is required when specifying values in GraphRankingModel.
My code is up at the github.com/SPCSR project, and you can access it directly from pzl.no/delveclone.
The code should be easy to understand and modify for your needs. Happy graphing!