mglaman / commerce_cart_api

Original sandbox WIP for the module now on Drupal.org. Do not fork. Patches accepted on Drupal.org
https://www.drupal.org/project/commerce_cart_api
9 stars 1 forks source link

Not "fixing includes" but adding default includes #13

Closed wimleers closed 5 years ago

wimleers commented 6 years ago

https://github.com/mglaman/commerce_cart_api/blob/b4a0a11d926ef803e162185b254a8ee9b292c063/src/Controller/CartResourceController.php#L152

This is not "fixing includes" but adding default includes.

I first thought there was a bug in jsonapi, but that's not what's going on here :) BTW, related issue to make this possible out-of-the-box in JSON API: https://www.drupal.org/project/jsonapi/issues/2994715. Feedback very welcome! 🙏

mglaman commented 5 years ago

In hindsight, I would rather not always include order items. They're technically embedded entities but what if someone just wanted to count the number of order items and not interact with them. It was a nice idea in the beginning, but I'd like to just remove it from the JSON API prototype.