Nested resources
Some endpoints support eager loading nested resources. Traede almost never loads nested resources automatically.
An example of this would be when fetching products. To eager load the variants of each product simply add includes
to the querystring.
Includes is an array of resources that should be eager loaded.
An example of this would be GET https://api.traede.com/V10/products/1000?includes[]=variants&includes[]=variants.costPrices
Notice here that includes
is an array type and can take multiple values. Notice also that we can loaded nested relationships and
nested resources as well by using the dot notation. In this case we are loading all variants and for each variants we are
loading it's cost prices.