We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Weight type should use WeightUnitsEnum
### What I'm trying to achieve
To have `Weight` type defined as
```graphql
type Weight {
  unit: WeightUnitsEnum!
  value: Float!
}
```
to maintain consistency with `Shop.defaultWeightUnit` field.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `saleor/graphql/core/types/common.py`
Content:
```
1 import graphene
2 
3 from ....product.templatetags.product_images import get_thumbnail
4 from ...translations.enums import LanguageCodeEnum
5 from ..enums import (
6     AccountErrorCode,
7     AppErrorCode,
8     CheckoutErrorCode,
9     DiscountErrorCode,
10     ExportErrorCode,
11     GiftCardErrorCode,
12     InvoiceErrorCode,
13     JobStatusEnum,
14     MenuErrorCode,
15     MetadataErrorCode,
16     OrderErrorCode,
17     PageErrorCode,
18     PaymentErrorCode,
19     PermissionEnum,
20     PermissionGroupErrorCode,
21     PluginErrorCode,
22     ProductErrorCode,
23     ShippingErrorCode,
24     ShopErrorCode,
25     StockErrorCode,
26     TranslationErrorCode,
27     WarehouseErrorCode,
28     WebhookErrorCode,
29     WishlistErrorCode,
30 )
31 from .money import VAT
32 
33 
34 class CountryDisplay(graphene.ObjectType):
35     code = graphene.String(description="Country code.", required=True)
36     country = graphene.String(description="Country name.", required=True)
37     vat = graphene.Field(VAT, description="Country tax.")
38 
39 
40 class LanguageDisplay(graphene.ObjectType):
41     code = LanguageCodeEnum(
42         description="ISO 639 representation of the language name.", required=True
43     )
44     language = graphene.String(description="Full name of the language.", required=True)
45 
46 
47 class Permission(graphene.ObjectType):
48     code = PermissionEnum(description="Internal code for permission.", required=True)
49     name = graphene.String(
50         description="Describe action(s) allowed to do by permission.", required=True
51     )
52 
53     class Meta:
54         description = "Represents a permission object in a friendly form."
55 
56 
57 class Error(graphene.ObjectType):
58     field = graphene.String(
59         description=(
60             "Name of a field that caused the error. A value of `null` indicates that "
61             "the error isn't associated with a particular field."
62         ),
63         required=False,
64     )
65     message = graphene.String(description="The error message.")
66 
67     class Meta:
68         description = "Represents an error in the input of a mutation."
69 
70 
71 class AccountError(Error):
72     code = AccountErrorCode(description="The error code.", required=True)
73 
74 
75 class AppError(Error):
76     code = AppErrorCode(description="The error code.", required=True)
77     permissions = graphene.List(
78         graphene.NonNull(PermissionEnum),
79         description="List of permissions which causes the error.",
80         required=False,
81     )
82 
83 
84 class StaffError(AccountError):
85     permissions = graphene.List(
86         graphene.NonNull(PermissionEnum),
87         description="List of permissions which causes the error.",
88         required=False,
89     )
90     groups = graphene.List(
91         graphene.NonNull(graphene.ID),
92         description="List of permission group IDs which cause the error.",
93         required=False,
94     )
95     users = graphene.List(
96         graphene.NonNull(graphene.ID),
97         description="List of user IDs which causes the error.",
98         required=False,
99     )
100 
101 
102 class CheckoutError(Error):
103     code = CheckoutErrorCode(description="The error code.", required=True)
104 
105 
106 class DiscountError(Error):
107     code = DiscountErrorCode(description="The error code.", required=True)
108 
109 
110 class ExportError(Error):
111     code = ExportErrorCode(description="The error code.", required=True)
112 
113 
114 class MenuError(Error):
115     code = MenuErrorCode(description="The error code.", required=True)
116 
117 
118 class MetadataError(Error):
119     code = MetadataErrorCode(description="The error code.", required=True)
120 
121 
122 class OrderError(Error):
123     code = OrderErrorCode(description="The error code.", required=True)
124     warehouse = graphene.ID(
125         description="Warehouse ID which causes the error.", required=False,
126     )
127     order_line = graphene.ID(
128         description="Order line ID which causes the error.", required=False,
129     )
130 
131 
132 class InvoiceError(Error):
133     code = InvoiceErrorCode(description="The error code.", required=True)
134 
135 
136 class PermissionGroupError(Error):
137     code = PermissionGroupErrorCode(description="The error code.", required=True)
138     permissions = graphene.List(
139         graphene.NonNull(PermissionEnum),
140         description="List of permissions which causes the error.",
141         required=False,
142     )
143     users = graphene.List(
144         graphene.NonNull(graphene.ID),
145         description="List of user IDs which causes the error.",
146         required=False,
147     )
148 
149 
150 class ProductError(Error):
151     code = ProductErrorCode(description="The error code.", required=True)
152 
153 
154 class ProductAttributeError(ProductError):
155     attributes = graphene.List(
156         graphene.NonNull(graphene.ID),
157         description="List of attributes IDs which causes the error.",
158         required=False,
159     )
160 
161 
162 class BulkProductError(ProductError):
163     index = graphene.Int(
164         description="Index of an input list item that caused the error."
165     )
166     warehouses = graphene.List(
167         graphene.NonNull(graphene.ID),
168         description="List of warehouse IDs which causes the error.",
169         required=False,
170     )
171 
172 
173 class ShopError(Error):
174     code = ShopErrorCode(description="The error code.", required=True)
175 
176 
177 class ShippingError(Error):
178     code = ShippingErrorCode(description="The error code.", required=True)
179     warehouses = graphene.List(
180         graphene.NonNull(graphene.ID),
181         description="List of warehouse IDs which causes the error.",
182         required=False,
183     )
184 
185 
186 class PageError(Error):
187     code = PageErrorCode(description="The error code.", required=True)
188 
189 
190 class PaymentError(Error):
191     code = PaymentErrorCode(description="The error code.", required=True)
192 
193 
194 class GiftCardError(Error):
195     code = GiftCardErrorCode(description="The error code.", required=True)
196 
197 
198 class PluginError(Error):
199     code = PluginErrorCode(description="The error code.", required=True)
200 
201 
202 class StockError(Error):
203     code = StockErrorCode(description="The error code.", required=True)
204 
205 
206 class BulkStockError(ProductError):
207     index = graphene.Int(
208         description="Index of an input list item that caused the error."
209     )
210 
211 
212 class WarehouseError(Error):
213     code = WarehouseErrorCode(description="The error code.", required=True)
214 
215 
216 class WebhookError(Error):
217     code = WebhookErrorCode(description="The error code.", required=True)
218 
219 
220 class WishlistError(Error):
221     code = WishlistErrorCode(description="The error code.", required=True)
222 
223 
224 class TranslationError(Error):
225     code = TranslationErrorCode(description="The error code.", required=True)
226 
227 
228 class SeoInput(graphene.InputObjectType):
229     title = graphene.String(description="SEO title.")
230     description = graphene.String(description="SEO description.")
231 
232 
233 class Weight(graphene.ObjectType):
234     unit = graphene.String(description="Weight unit.", required=True)
235     value = graphene.Float(description="Weight value.", required=True)
236 
237     class Meta:
238         description = "Represents weight value in a specific weight unit."
239 
240 
241 class Image(graphene.ObjectType):
242     url = graphene.String(required=True, description="The URL of the image.")
243     alt = graphene.String(description="Alt text for an image.")
244 
245     class Meta:
246         description = "Represents an image."
247 
248     @staticmethod
249     def get_adjusted(image, alt, size, rendition_key_set, info):
250         """Return Image adjusted with given size."""
251         if size:
252             url = get_thumbnail(
253                 image_file=image,
254                 size=size,
255                 method="thumbnail",
256                 rendition_key_set=rendition_key_set,
257             )
258         else:
259             url = image.url
260         url = info.context.build_absolute_uri(url)
261         return Image(url, alt)
262 
263 
264 class PriceRangeInput(graphene.InputObjectType):
265     gte = graphene.Float(description="Price greater than or equal to.", required=False)
266     lte = graphene.Float(description="Price less than or equal to.", required=False)
267 
268 
269 class DateRangeInput(graphene.InputObjectType):
270     gte = graphene.Date(description="Start date.", required=False)
271     lte = graphene.Date(description="End date.", required=False)
272 
273 
274 class DateTimeRangeInput(graphene.InputObjectType):
275     gte = graphene.DateTime(description="Start date.", required=False)
276     lte = graphene.DateTime(description="End date.", required=False)
277 
278 
279 class IntRangeInput(graphene.InputObjectType):
280     gte = graphene.Int(description="Value greater than or equal to.", required=False)
281     lte = graphene.Int(description="Value less than or equal to.", required=False)
282 
283 
284 class TaxType(graphene.ObjectType):
285     """Representation of tax types fetched from tax gateway."""
286 
287     description = graphene.String(description="Description of the tax type.")
288     tax_code = graphene.String(
289         description="External tax code used to identify given tax group."
290     )
291 
292 
293 class Job(graphene.Interface):
294     status = JobStatusEnum(description="Job status.", required=True)
295     created_at = graphene.DateTime(
296         description="Created date time of job in ISO 8601 format.", required=True
297     )
298     updated_at = graphene.DateTime(
299         description="Date time of job last update in ISO 8601 format.", required=True
300     )
301     message = graphene.String(description="Job message.")
302 
303     @classmethod
304     def resolve_type(cls, instance, _info):
305         """Map a data object to a Graphene type."""
306         MODEL_TO_TYPE_MAP = {
307             # <DjangoModel>: <GrapheneType>
308         }
309         return MODEL_TO_TYPE_MAP.get(type(instance))
310
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py
--- a/saleor/graphql/core/types/common.py
+++ b/saleor/graphql/core/types/common.py
@@ -26,6 +26,7 @@
     TranslationErrorCode,
     WarehouseErrorCode,
     WebhookErrorCode,
+    WeightUnitsEnum,
     WishlistErrorCode,
 )
 from .money import VAT
@@ -231,7 +232,7 @@
 
 
 class Weight(graphene.ObjectType):
-    unit = graphene.String(description="Weight unit.", required=True)
+    unit = WeightUnitsEnum(description="Weight unit.", required=True)
     value = graphene.Float(description="Weight value.", required=True)
 
     class Meta:

{"golden_diff": "diff --git a/saleor/graphql/core/types/common.py b/saleor/graphql/core/types/common.py\n--- a/saleor/graphql/core/types/common.py\n+++ b/saleor/graphql/core/types/common.py\n@@ -26,6 +26,7 @@\n     TranslationErrorCode,\n     WarehouseErrorCode,\n     WebhookErrorCode,\n+    WeightUnitsEnum,\n     WishlistErrorCode,\n )\n from .money import VAT\n@@ -231,7 +232,7 @@\n \n \n class Weight(graphene.ObjectType):\n-    unit = graphene.String(description=\"Weight unit.\", required=True)\n+    unit = WeightUnitsEnum(description=\"Weight unit.\", required=True)\n     value = graphene.Float(description=\"Weight value.\", required=True)\n \n     class Meta:\n", "issue": "Weight type should use WeightUnitsEnum\n### What I'm trying to achieve\r\nTo have `Weight` type defined as\r\n```graphql\r\ntype Weight {\r\n  unit: WeightUnitsEnum!\r\n  value: Float!\r\n}\r\n```\r\nto maintain consistency with `Shop.defaultWeightUnit` field.\n", "before_files": [{"content": "import graphene\n\nfrom ....product.templatetags.product_images import get_thumbnail\nfrom ...translations.enums import LanguageCodeEnum\nfrom ..enums import (\n    AccountErrorCode,\n    AppErrorCode,\n    CheckoutErrorCode,\n    DiscountErrorCode,\n    ExportErrorCode,\n    GiftCardErrorCode,\n    InvoiceErrorCode,\n    JobStatusEnum,\n    MenuErrorCode,\n    MetadataErrorCode,\n    OrderErrorCode,\n    PageErrorCode,\n    PaymentErrorCode,\n    PermissionEnum,\n    PermissionGroupErrorCode,\n    PluginErrorCode,\n    ProductErrorCode,\n    ShippingErrorCode,\n    ShopErrorCode,\n    StockErrorCode,\n    TranslationErrorCode,\n    WarehouseErrorCode,\n    WebhookErrorCode,\n    WishlistErrorCode,\n)\nfrom .money import VAT\n\n\nclass CountryDisplay(graphene.ObjectType):\n    code = graphene.String(description=\"Country code.\", required=True)\n    country = graphene.String(description=\"Country name.\", required=True)\n    vat = graphene.Field(VAT, description=\"Country tax.\")\n\n\nclass LanguageDisplay(graphene.ObjectType):\n    code = LanguageCodeEnum(\n        description=\"ISO 639 representation of the language name.\", required=True\n    )\n    language = graphene.String(description=\"Full name of the language.\", required=True)\n\n\nclass Permission(graphene.ObjectType):\n    code = PermissionEnum(description=\"Internal code for permission.\", required=True)\n    name = graphene.String(\n        description=\"Describe action(s) allowed to do by permission.\", required=True\n    )\n\n    class Meta:\n        description = \"Represents a permission object in a friendly form.\"\n\n\nclass Error(graphene.ObjectType):\n    field = graphene.String(\n        description=(\n            \"Name of a field that caused the error. A value of `null` indicates that \"\n            \"the error isn't associated with a particular field.\"\n        ),\n        required=False,\n    )\n    message = graphene.String(description=\"The error message.\")\n\n    class Meta:\n        description = \"Represents an error in the input of a mutation.\"\n\n\nclass AccountError(Error):\n    code = AccountErrorCode(description=\"The error code.\", required=True)\n\n\nclass AppError(Error):\n    code = AppErrorCode(description=\"The error code.\", required=True)\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n\n\nclass StaffError(AccountError):\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n    groups = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of permission group IDs which cause the error.\",\n        required=False,\n    )\n    users = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of user IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass CheckoutError(Error):\n    code = CheckoutErrorCode(description=\"The error code.\", required=True)\n\n\nclass DiscountError(Error):\n    code = DiscountErrorCode(description=\"The error code.\", required=True)\n\n\nclass ExportError(Error):\n    code = ExportErrorCode(description=\"The error code.\", required=True)\n\n\nclass MenuError(Error):\n    code = MenuErrorCode(description=\"The error code.\", required=True)\n\n\nclass MetadataError(Error):\n    code = MetadataErrorCode(description=\"The error code.\", required=True)\n\n\nclass OrderError(Error):\n    code = OrderErrorCode(description=\"The error code.\", required=True)\n    warehouse = graphene.ID(\n        description=\"Warehouse ID which causes the error.\", required=False,\n    )\n    order_line = graphene.ID(\n        description=\"Order line ID which causes the error.\", required=False,\n    )\n\n\nclass InvoiceError(Error):\n    code = InvoiceErrorCode(description=\"The error code.\", required=True)\n\n\nclass PermissionGroupError(Error):\n    code = PermissionGroupErrorCode(description=\"The error code.\", required=True)\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n    users = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of user IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass ProductError(Error):\n    code = ProductErrorCode(description=\"The error code.\", required=True)\n\n\nclass ProductAttributeError(ProductError):\n    attributes = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of attributes IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass BulkProductError(ProductError):\n    index = graphene.Int(\n        description=\"Index of an input list item that caused the error.\"\n    )\n    warehouses = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of warehouse IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass ShopError(Error):\n    code = ShopErrorCode(description=\"The error code.\", required=True)\n\n\nclass ShippingError(Error):\n    code = ShippingErrorCode(description=\"The error code.\", required=True)\n    warehouses = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of warehouse IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass PageError(Error):\n    code = PageErrorCode(description=\"The error code.\", required=True)\n\n\nclass PaymentError(Error):\n    code = PaymentErrorCode(description=\"The error code.\", required=True)\n\n\nclass GiftCardError(Error):\n    code = GiftCardErrorCode(description=\"The error code.\", required=True)\n\n\nclass PluginError(Error):\n    code = PluginErrorCode(description=\"The error code.\", required=True)\n\n\nclass StockError(Error):\n    code = StockErrorCode(description=\"The error code.\", required=True)\n\n\nclass BulkStockError(ProductError):\n    index = graphene.Int(\n        description=\"Index of an input list item that caused the error.\"\n    )\n\n\nclass WarehouseError(Error):\n    code = WarehouseErrorCode(description=\"The error code.\", required=True)\n\n\nclass WebhookError(Error):\n    code = WebhookErrorCode(description=\"The error code.\", required=True)\n\n\nclass WishlistError(Error):\n    code = WishlistErrorCode(description=\"The error code.\", required=True)\n\n\nclass TranslationError(Error):\n    code = TranslationErrorCode(description=\"The error code.\", required=True)\n\n\nclass SeoInput(graphene.InputObjectType):\n    title = graphene.String(description=\"SEO title.\")\n    description = graphene.String(description=\"SEO description.\")\n\n\nclass Weight(graphene.ObjectType):\n    unit = graphene.String(description=\"Weight unit.\", required=True)\n    value = graphene.Float(description=\"Weight value.\", required=True)\n\n    class Meta:\n        description = \"Represents weight value in a specific weight unit.\"\n\n\nclass Image(graphene.ObjectType):\n    url = graphene.String(required=True, description=\"The URL of the image.\")\n    alt = graphene.String(description=\"Alt text for an image.\")\n\n    class Meta:\n        description = \"Represents an image.\"\n\n    @staticmethod\n    def get_adjusted(image, alt, size, rendition_key_set, info):\n        \"\"\"Return Image adjusted with given size.\"\"\"\n        if size:\n            url = get_thumbnail(\n                image_file=image,\n                size=size,\n                method=\"thumbnail\",\n                rendition_key_set=rendition_key_set,\n            )\n        else:\n            url = image.url\n        url = info.context.build_absolute_uri(url)\n        return Image(url, alt)\n\n\nclass PriceRangeInput(graphene.InputObjectType):\n    gte = graphene.Float(description=\"Price greater than or equal to.\", required=False)\n    lte = graphene.Float(description=\"Price less than or equal to.\", required=False)\n\n\nclass DateRangeInput(graphene.InputObjectType):\n    gte = graphene.Date(description=\"Start date.\", required=False)\n    lte = graphene.Date(description=\"End date.\", required=False)\n\n\nclass DateTimeRangeInput(graphene.InputObjectType):\n    gte = graphene.DateTime(description=\"Start date.\", required=False)\n    lte = graphene.DateTime(description=\"End date.\", required=False)\n\n\nclass IntRangeInput(graphene.InputObjectType):\n    gte = graphene.Int(description=\"Value greater than or equal to.\", required=False)\n    lte = graphene.Int(description=\"Value less than or equal to.\", required=False)\n\n\nclass TaxType(graphene.ObjectType):\n    \"\"\"Representation of tax types fetched from tax gateway.\"\"\"\n\n    description = graphene.String(description=\"Description of the tax type.\")\n    tax_code = graphene.String(\n        description=\"External tax code used to identify given tax group.\"\n    )\n\n\nclass Job(graphene.Interface):\n    status = JobStatusEnum(description=\"Job status.\", required=True)\n    created_at = graphene.DateTime(\n        description=\"Created date time of job in ISO 8601 format.\", required=True\n    )\n    updated_at = graphene.DateTime(\n        description=\"Date time of job last update in ISO 8601 format.\", required=True\n    )\n    message = graphene.String(description=\"Job message.\")\n\n    @classmethod\n    def resolve_type(cls, instance, _info):\n        \"\"\"Map a data object to a Graphene type.\"\"\"\n        MODEL_TO_TYPE_MAP = {\n            # <DjangoModel>: <GrapheneType>\n        }\n        return MODEL_TO_TYPE_MAP.get(type(instance))\n", "path": "saleor/graphql/core/types/common.py"}], "after_files": [{"content": "import graphene\n\nfrom ....product.templatetags.product_images import get_thumbnail\nfrom ...translations.enums import LanguageCodeEnum\nfrom ..enums import (\n    AccountErrorCode,\n    AppErrorCode,\n    CheckoutErrorCode,\n    DiscountErrorCode,\n    ExportErrorCode,\n    GiftCardErrorCode,\n    InvoiceErrorCode,\n    JobStatusEnum,\n    MenuErrorCode,\n    MetadataErrorCode,\n    OrderErrorCode,\n    PageErrorCode,\n    PaymentErrorCode,\n    PermissionEnum,\n    PermissionGroupErrorCode,\n    PluginErrorCode,\n    ProductErrorCode,\n    ShippingErrorCode,\n    ShopErrorCode,\n    StockErrorCode,\n    TranslationErrorCode,\n    WarehouseErrorCode,\n    WebhookErrorCode,\n    WeightUnitsEnum,\n    WishlistErrorCode,\n)\nfrom .money import VAT\n\n\nclass CountryDisplay(graphene.ObjectType):\n    code = graphene.String(description=\"Country code.\", required=True)\n    country = graphene.String(description=\"Country name.\", required=True)\n    vat = graphene.Field(VAT, description=\"Country tax.\")\n\n\nclass LanguageDisplay(graphene.ObjectType):\n    code = LanguageCodeEnum(\n        description=\"ISO 639 representation of the language name.\", required=True\n    )\n    language = graphene.String(description=\"Full name of the language.\", required=True)\n\n\nclass Permission(graphene.ObjectType):\n    code = PermissionEnum(description=\"Internal code for permission.\", required=True)\n    name = graphene.String(\n        description=\"Describe action(s) allowed to do by permission.\", required=True\n    )\n\n    class Meta:\n        description = \"Represents a permission object in a friendly form.\"\n\n\nclass Error(graphene.ObjectType):\n    field = graphene.String(\n        description=(\n            \"Name of a field that caused the error. A value of `null` indicates that \"\n            \"the error isn't associated with a particular field.\"\n        ),\n        required=False,\n    )\n    message = graphene.String(description=\"The error message.\")\n\n    class Meta:\n        description = \"Represents an error in the input of a mutation.\"\n\n\nclass AccountError(Error):\n    code = AccountErrorCode(description=\"The error code.\", required=True)\n\n\nclass AppError(Error):\n    code = AppErrorCode(description=\"The error code.\", required=True)\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n\n\nclass StaffError(AccountError):\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n    groups = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of permission group IDs which cause the error.\",\n        required=False,\n    )\n    users = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of user IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass CheckoutError(Error):\n    code = CheckoutErrorCode(description=\"The error code.\", required=True)\n\n\nclass DiscountError(Error):\n    code = DiscountErrorCode(description=\"The error code.\", required=True)\n\n\nclass ExportError(Error):\n    code = ExportErrorCode(description=\"The error code.\", required=True)\n\n\nclass MenuError(Error):\n    code = MenuErrorCode(description=\"The error code.\", required=True)\n\n\nclass MetadataError(Error):\n    code = MetadataErrorCode(description=\"The error code.\", required=True)\n\n\nclass OrderError(Error):\n    code = OrderErrorCode(description=\"The error code.\", required=True)\n    warehouse = graphene.ID(\n        description=\"Warehouse ID which causes the error.\", required=False,\n    )\n    order_line = graphene.ID(\n        description=\"Order line ID which causes the error.\", required=False,\n    )\n\n\nclass InvoiceError(Error):\n    code = InvoiceErrorCode(description=\"The error code.\", required=True)\n\n\nclass PermissionGroupError(Error):\n    code = PermissionGroupErrorCode(description=\"The error code.\", required=True)\n    permissions = graphene.List(\n        graphene.NonNull(PermissionEnum),\n        description=\"List of permissions which causes the error.\",\n        required=False,\n    )\n    users = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of user IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass ProductError(Error):\n    code = ProductErrorCode(description=\"The error code.\", required=True)\n\n\nclass ProductAttributeError(ProductError):\n    attributes = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of attributes IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass BulkProductError(ProductError):\n    index = graphene.Int(\n        description=\"Index of an input list item that caused the error.\"\n    )\n    warehouses = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of warehouse IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass ShopError(Error):\n    code = ShopErrorCode(description=\"The error code.\", required=True)\n\n\nclass ShippingError(Error):\n    code = ShippingErrorCode(description=\"The error code.\", required=True)\n    warehouses = graphene.List(\n        graphene.NonNull(graphene.ID),\n        description=\"List of warehouse IDs which causes the error.\",\n        required=False,\n    )\n\n\nclass PageError(Error):\n    code = PageErrorCode(description=\"The error code.\", required=True)\n\n\nclass PaymentError(Error):\n    code = PaymentErrorCode(description=\"The error code.\", required=True)\n\n\nclass GiftCardError(Error):\n    code = GiftCardErrorCode(description=\"The error code.\", required=True)\n\n\nclass PluginError(Error):\n    code = PluginErrorCode(description=\"The error code.\", required=True)\n\n\nclass StockError(Error):\n    code = StockErrorCode(description=\"The error code.\", required=True)\n\n\nclass BulkStockError(ProductError):\n    index = graphene.Int(\n        description=\"Index of an input list item that caused the error.\"\n    )\n\n\nclass WarehouseError(Error):\n    code = WarehouseErrorCode(description=\"The error code.\", required=True)\n\n\nclass WebhookError(Error):\n    code = WebhookErrorCode(description=\"The error code.\", required=True)\n\n\nclass WishlistError(Error):\n    code = WishlistErrorCode(description=\"The error code.\", required=True)\n\n\nclass TranslationError(Error):\n    code = TranslationErrorCode(description=\"The error code.\", required=True)\n\n\nclass SeoInput(graphene.InputObjectType):\n    title = graphene.String(description=\"SEO title.\")\n    description = graphene.String(description=\"SEO description.\")\n\n\nclass Weight(graphene.ObjectType):\n    unit = WeightUnitsEnum(description=\"Weight unit.\", required=True)\n    value = graphene.Float(description=\"Weight value.\", required=True)\n\n    class Meta:\n        description = \"Represents weight value in a specific weight unit.\"\n\n\nclass Image(graphene.ObjectType):\n    url = graphene.String(required=True, description=\"The URL of the image.\")\n    alt = graphene.String(description=\"Alt text for an image.\")\n\n    class Meta:\n        description = \"Represents an image.\"\n\n    @staticmethod\n    def get_adjusted(image, alt, size, rendition_key_set, info):\n        \"\"\"Return Image adjusted with given size.\"\"\"\n        if size:\n            url = get_thumbnail(\n                image_file=image,\n                size=size,\n                method=\"thumbnail\",\n                rendition_key_set=rendition_key_set,\n            )\n        else:\n            url = image.url\n        url = info.context.build_absolute_uri(url)\n        return Image(url, alt)\n\n\nclass PriceRangeInput(graphene.InputObjectType):\n    gte = graphene.Float(description=\"Price greater than or equal to.\", required=False)\n    lte = graphene.Float(description=\"Price less than or equal to.\", required=False)\n\n\nclass DateRangeInput(graphene.InputObjectType):\n    gte = graphene.Date(description=\"Start date.\", required=False)\n    lte = graphene.Date(description=\"End date.\", required=False)\n\n\nclass DateTimeRangeInput(graphene.InputObjectType):\n    gte = graphene.DateTime(description=\"Start date.\", required=False)\n    lte = graphene.DateTime(description=\"End date.\", required=False)\n\n\nclass IntRangeInput(graphene.InputObjectType):\n    gte = graphene.Int(description=\"Value greater than or equal to.\", required=False)\n    lte = graphene.Int(description=\"Value less than or equal to.\", required=False)\n\n\nclass TaxType(graphene.ObjectType):\n    \"\"\"Representation of tax types fetched from tax gateway.\"\"\"\n\n    description = graphene.String(description=\"Description of the tax type.\")\n    tax_code = graphene.String(\n        description=\"External tax code used to identify given tax group.\"\n    )\n\n\nclass Job(graphene.Interface):\n    status = JobStatusEnum(description=\"Job status.\", required=True)\n    created_at = graphene.DateTime(\n        description=\"Created date time of job in ISO 8601 format.\", required=True\n    )\n    updated_at = graphene.DateTime(\n        description=\"Date time of job last update in ISO 8601 format.\", required=True\n    )\n    message = graphene.String(description=\"Job message.\")\n\n    @classmethod\n    def resolve_type(cls, instance, _info):\n        \"\"\"Map a data object to a Graphene type.\"\"\"\n        MODEL_TO_TYPE_MAP = {\n            # <DjangoModel>: <GrapheneType>\n        }\n        return MODEL_TO_TYPE_MAP.get(type(instance))\n", "path": "saleor/graphql/core/types/common.py"}]}