I have an endpoint that allows me to get the top node of my graph. I also allow the client to specify the nodes he wishes to retrieve that are children of the top node:
For example:
/libraries/5?with=banner|videos
This will retrieve me a library with a banner object and a list of videos.
I provide a full query language, that supports nesting. For example if you wanted the same structure but including the covers and chapters for each video you would request this:
/libraries/5?with=banner|videos[cover|chapters]
I need to build the object dynamically when the request comes in. I have had a look at Clay, but the project seems a little old, and I am sure there is a better way to build objects at runtime than using ExpandoObject.
If anyone has any ideas, I would be most grateful?