Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Refactor Image type
Artur Smętca7753fbc0f9
diff --git a/saleor/graphql/product/types.py b/saleor/graphql/product/types.pyindex af3e6307fe..395d185545 100644--- a/saleor/graphql/product/types.py+++ b/saleor/graphql/product/types.py@@ -351,21 +351,6 @@ class ProductType(CountableDjangoObjectType):return gql_optimizer.query(qs, info)-class ImageWithThumbnail(graphene.ObjectType):- url = graphene.String(- required=True,- description='The URL of the image.',- size=graphene.Int(description='Size of the image'))-- class Meta:- description = 'Represents an image.'-- def resolve_url(self, info, size=None):- if size:- return get_thumbnail(self, size)- return self.url--class Collection(CountableDjangoObjectType):products = gql_optimizer.field(PrefetchingConnectionField(