Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Prefetch collections for product availability

Michał Jelonek47524baeb9af
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.py
index 8538030d47..e951758d83 100644
--- a/saleor/graphql/product/types.py
+++ b/saleor/graphql/product/types.py
@@ -359,7 +359,7 @@ class Product(CountableDjangoObjectType):
return self.get_absolute_url()
@gql_optimizer.resolver_hints(
- prefetch_related='variants',
+ prefetch_related=('variants', 'collections'),
only=['publication_date', 'charge_taxes', 'price', 'tax_rate'])
def resolve_availability(self, info):
context = info.context