Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Optimize fetching product thumbnails
Marcin Gębalad3c2f840b1d5
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.pyindex b1e807c29e..610d594fab 100644--- a/saleor/graphql/product/types.py+++ b/saleor/graphql/product/types.py@@ -283,6 +283,7 @@ class Product(CountableDjangoObjectType):self.get_first_image(), size, method='thumbnail')return info.context.build_absolute_uri(url)+ @gql_optimizer.resolver_hints(prefetch_related='images')def resolve_thumbnail(self, info, *, size=None):image = self.get_first_image()if not size: