ethanresnick / json-api

Turn your node app into a JSON API server (http://jsonapi.org/)
GNU Lesser General Public License v3.0
268 stars 41 forks source link

FYI: nested includes implementation #112

Open andrewbranch opened 8 years ago

andrewbranch commented 8 years ago

Hi again,

Unfortunately my fork of this repo eventually had to diverge to support some half-baked features I added that weren’t really ready to merge, and they’re not completely reconcilable now. However, I did manage just now to support nested includes, with the help of mongoose-deep-populate. It’s admittedly a little awkward to register a plugin on the mongoose schemas inside library code, but this allowed us to get the work done within a day. I don’t anticipate you’ll want to backport all of this, but in case any of it was useful to you, I wanted to share how we did it. Feel free to close this issue. Take care!

ethanresnick commented 8 years ago

Thanks Andrew! I'll keep this open as a reminder to myself, for the next time I have a chance to seriously update my library. Appreciate you sharing it!