While adding support for Office Graph queries in the SharePoint 2013 Query Tool, I had to figure out how to send the query in as POST and not just GET. This led me into the Properties property of a search query. Basically it is a key value store that Microsoft can use to extend the search APIs over time without breaking anything. And this is what the Graph queries use.
As long as you manage to encode it just right, it’s all about editing a web part definition in your favorite text editor.
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 that 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 you may modify it for your needs. Happy graphing!