🚨 Announcement: A New Chapter for Vendure read more

HydrateOptions

HydrateOptions

Package: @vendure/core File: entity-hydrator-types.ts
v1.3.0

Options used to control which relations of the entity get hydrated when using the EntityHydrator helper.

Signature

interface HydrateOptions<Entity extends VendureEntity> {
  relations: Array<EntityRelationPaths<Entity>>;
  applyProductVariantPrices?: boolean;
}

Members

relations

property
type:
Array<EntityRelationPaths<Entity>>
Defines the relations to hydrate, using strings with dot notation to indicate nested joins. If the entity already has a particular relation available, that relation will be skipped (no extra DB join will be added).

applyProductVariantPrices

property
type:
boolean
default:
false
If set to true, any ProductVariants will also have their price and priceWithTax fields applied based on the current context. If prices are not required, this can be left false which will be slightly more efficient.