Centarro: Supporting cross-bundle entity collections in JSON:API

Last week I recapped my experience at Decoupled Days 2019, and there’s one exciting development coming out of that event I wanted to write more about. We’ve had a serious challenge using the JSON:API module with Drupal Commerce for a while now – cross-bundle entity collections.

Drupal Commerce lets merchants define any number of product types to match their product data models. However, these different types of products all need to be represented in a single product catalog. Building that is easy enough with Drupal’s Views module, but it’s a challenge via JSON:API given it’s oriented more toward serving entities of a single type, or bundle, from its collection resources.