fractal
fractal copied to clipboard
Including Sub Includes That Match The Key Of Parent Includes Breaks Things
Firstly, great work on Fractal, it's incredibly helpful for my work! Thank you! Here's an issue:
See this URL: ?embed=comments,users,albums,counts,users.images
That works fine.
See this URL: ?embed=comments,users,albums,counts,images
That works fine
See this URL: ?embed=comments,users,albums,counts,images,users.images
That breaks and exhausts all memory available on the server for some reason. It appears to only be a problem when the main transformer has an include that matches a sub-include name. This used to work but since I upgraded the library I've found it is no longer working as expected.
Hey, could you give me some more information on your project and the basics of you have in your transformers to replicate this? If it's a bit big then stick it in a gist.
I'll also need to know what (if any) framework and ORM you're using, which Fractal serializer you're using and anything else you might think outside of fractal which is related to the loading and including of data from your data source, it sounds like theres an recursive loop going on somewhere!
@willishq Apologies for the delays. Using Laravel 5.2 and Eloquent and a basic DataSerializer for Fractal. It was so long ago to be honest I have completely forgotten most details. I just changed the naming for now.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 4 weeks if no further activity occurs. Thank you for your contributions.