Closed wimleers closed 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.
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! 🙏