We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Make sure all GraphQL types that accept or return a country code use an enum type
Currently some types return an enum, some return a string and `VoucherInput` takes a list of strings.

--- 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/shipping/types.py`
Content:
```
1 import decimal
2 
3 import graphene
4 from graphene import relay
5 from graphene.types import Scalar
6 from graphene_django import DjangoObjectType
7 from measurement.measures import Weight
8 
9 from ...core.weight import convert_weight, get_default_weight_unit
10 from ...shipping import ShippingMethodType, models
11 from ..core.types.common import CountableDjangoObjectType
12 from ..core.types.money import MoneyRange
13 
14 ShippingMethodTypeEnum = graphene.Enum(
15     'ShippingMethodTypeEnum',
16     [(code.upper(), code) for code, name in ShippingMethodType.CHOICES])
17 
18 
19 class ShippingMethod(DjangoObjectType):
20     type = ShippingMethodTypeEnum(description='Type of the shipping method.')
21 
22     class Meta:
23         description = """
24             Shipping method are the methods you'll use to get
25             customer's orders to them.
26             They are directly exposed to the customers."""
27         model = models.ShippingMethod
28         interfaces = [relay.Node]
29         exclude_fields = ['shipping_zone', 'orders']
30 
31 
32 class ShippingZone(CountableDjangoObjectType):
33     price_range = graphene.Field(
34         MoneyRange, description='Lowest and highest prices for the shipping.')
35     countries = graphene.List(
36         graphene.String,
37         description='List of countries available for the method.')
38     shipping_methods = graphene.List(
39         ShippingMethod,
40         description=(
41             'List of shipping methods available for orders'
42             ' shipped to countries within this shipping zone.'))
43 
44     class Meta:
45         description = """
46             Represents a shipping zone in the shop. Zones are the concept
47             used only for grouping shipping methods in the dashboard,
48             and are never exposed to the customers directly."""
49         model = models.ShippingZone
50         interfaces = [relay.Node]
51         filter_fields = {
52             'name': ['icontains'],
53             'countries': ['icontains'],
54             'shipping_methods__price': ['gte', 'lte']}
55 
56     def resolve_price_range(self, info):
57         return self.price_range
58 
59     def resolve_countries(self, info):
60         return self.countries
61 
62     def resolve_shipping_methods(self, info):
63         return self.shipping_methods.all()
64 
65 
66 class WeightScalar(Scalar):
67     @staticmethod
68     def parse_value(value):
69         """Excepts value to be a string "amount unit"
70         separated by a single space.
71         """
72         try:
73             value = decimal.Decimal(value)
74         except decimal.DecimalException:
75             return None
76         default_unit = get_default_weight_unit()
77         return Weight(**{default_unit: value})
78 
79     @staticmethod
80     def serialize(weight):
81         if isinstance(weight, Weight):
82             default_unit = get_default_weight_unit()
83             if weight.unit != default_unit:
84                 weight = convert_weight(weight, default_unit)
85             return str(weight)
86         return None
87 
88     @staticmethod
89     def parse_literal(node):
90         return node
91
```
--- 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/shipping/types.py b/saleor/graphql/shipping/types.py
--- a/saleor/graphql/shipping/types.py
+++ b/saleor/graphql/shipping/types.py
@@ -8,7 +8,7 @@
 
 from ...core.weight import convert_weight, get_default_weight_unit
 from ...shipping import ShippingMethodType, models
-from ..core.types.common import CountableDjangoObjectType
+from ..core.types.common import CountableDjangoObjectType, CountryDisplay
 from ..core.types.money import MoneyRange
 
 ShippingMethodTypeEnum = graphene.Enum(
@@ -33,7 +33,7 @@
     price_range = graphene.Field(
         MoneyRange, description='Lowest and highest prices for the shipping.')
     countries = graphene.List(
-        graphene.String,
+        CountryDisplay,
         description='List of countries available for the method.')
     shipping_methods = graphene.List(
         ShippingMethod,
@@ -57,7 +57,9 @@
         return self.price_range
 
     def resolve_countries(self, info):
-        return self.countries
+        return [
+            CountryDisplay(code=country.code, country=country.name)
+            for country in self.countries]
 
     def resolve_shipping_methods(self, info):
         return self.shipping_methods.all()

{"golden_diff": "diff --git a/saleor/graphql/shipping/types.py b/saleor/graphql/shipping/types.py\n--- a/saleor/graphql/shipping/types.py\n+++ b/saleor/graphql/shipping/types.py\n@@ -8,7 +8,7 @@\n \n from ...core.weight import convert_weight, get_default_weight_unit\n from ...shipping import ShippingMethodType, models\n-from ..core.types.common import CountableDjangoObjectType\n+from ..core.types.common import CountableDjangoObjectType, CountryDisplay\n from ..core.types.money import MoneyRange\n \n ShippingMethodTypeEnum = graphene.Enum(\n@@ -33,7 +33,7 @@\n     price_range = graphene.Field(\n         MoneyRange, description='Lowest and highest prices for the shipping.')\n     countries = graphene.List(\n-        graphene.String,\n+        CountryDisplay,\n         description='List of countries available for the method.')\n     shipping_methods = graphene.List(\n         ShippingMethod,\n@@ -57,7 +57,9 @@\n         return self.price_range\n \n     def resolve_countries(self, info):\n-        return self.countries\n+        return [\n+            CountryDisplay(code=country.code, country=country.name)\n+            for country in self.countries]\n \n     def resolve_shipping_methods(self, info):\n         return self.shipping_methods.all()\n", "issue": "Make sure all GraphQL types that accept or return a country code use an enum type\nCurrently some types return an enum, some return a string and `VoucherInput` takes a list of strings.\n", "before_files": [{"content": "import decimal\n\nimport graphene\nfrom graphene import relay\nfrom graphene.types import Scalar\nfrom graphene_django import DjangoObjectType\nfrom measurement.measures import Weight\n\nfrom ...core.weight import convert_weight, get_default_weight_unit\nfrom ...shipping import ShippingMethodType, models\nfrom ..core.types.common import CountableDjangoObjectType\nfrom ..core.types.money import MoneyRange\n\nShippingMethodTypeEnum = graphene.Enum(\n    'ShippingMethodTypeEnum',\n    [(code.upper(), code) for code, name in ShippingMethodType.CHOICES])\n\n\nclass ShippingMethod(DjangoObjectType):\n    type = ShippingMethodTypeEnum(description='Type of the shipping method.')\n\n    class Meta:\n        description = \"\"\"\n            Shipping method are the methods you'll use to get\n            customer's orders to them.\n            They are directly exposed to the customers.\"\"\"\n        model = models.ShippingMethod\n        interfaces = [relay.Node]\n        exclude_fields = ['shipping_zone', 'orders']\n\n\nclass ShippingZone(CountableDjangoObjectType):\n    price_range = graphene.Field(\n        MoneyRange, description='Lowest and highest prices for the shipping.')\n    countries = graphene.List(\n        graphene.String,\n        description='List of countries available for the method.')\n    shipping_methods = graphene.List(\n        ShippingMethod,\n        description=(\n            'List of shipping methods available for orders'\n            ' shipped to countries within this shipping zone.'))\n\n    class Meta:\n        description = \"\"\"\n            Represents a shipping zone in the shop. Zones are the concept\n            used only for grouping shipping methods in the dashboard,\n            and are never exposed to the customers directly.\"\"\"\n        model = models.ShippingZone\n        interfaces = [relay.Node]\n        filter_fields = {\n            'name': ['icontains'],\n            'countries': ['icontains'],\n            'shipping_methods__price': ['gte', 'lte']}\n\n    def resolve_price_range(self, info):\n        return self.price_range\n\n    def resolve_countries(self, info):\n        return self.countries\n\n    def resolve_shipping_methods(self, info):\n        return self.shipping_methods.all()\n\n\nclass WeightScalar(Scalar):\n    @staticmethod\n    def parse_value(value):\n        \"\"\"Excepts value to be a string \"amount unit\"\n        separated by a single space.\n        \"\"\"\n        try:\n            value = decimal.Decimal(value)\n        except decimal.DecimalException:\n            return None\n        default_unit = get_default_weight_unit()\n        return Weight(**{default_unit: value})\n\n    @staticmethod\n    def serialize(weight):\n        if isinstance(weight, Weight):\n            default_unit = get_default_weight_unit()\n            if weight.unit != default_unit:\n                weight = convert_weight(weight, default_unit)\n            return str(weight)\n        return None\n\n    @staticmethod\n    def parse_literal(node):\n        return node\n", "path": "saleor/graphql/shipping/types.py"}], "after_files": [{"content": "import decimal\n\nimport graphene\nfrom graphene import relay\nfrom graphene.types import Scalar\nfrom graphene_django import DjangoObjectType\nfrom measurement.measures import Weight\n\nfrom ...core.weight import convert_weight, get_default_weight_unit\nfrom ...shipping import ShippingMethodType, models\nfrom ..core.types.common import CountableDjangoObjectType, CountryDisplay\nfrom ..core.types.money import MoneyRange\n\nShippingMethodTypeEnum = graphene.Enum(\n    'ShippingMethodTypeEnum',\n    [(code.upper(), code) for code, name in ShippingMethodType.CHOICES])\n\n\nclass ShippingMethod(DjangoObjectType):\n    type = ShippingMethodTypeEnum(description='Type of the shipping method.')\n\n    class Meta:\n        description = \"\"\"\n            Shipping method are the methods you'll use to get\n            customer's orders to them.\n            They are directly exposed to the customers.\"\"\"\n        model = models.ShippingMethod\n        interfaces = [relay.Node]\n        exclude_fields = ['shipping_zone', 'orders']\n\n\nclass ShippingZone(CountableDjangoObjectType):\n    price_range = graphene.Field(\n        MoneyRange, description='Lowest and highest prices for the shipping.')\n    countries = graphene.List(\n        CountryDisplay,\n        description='List of countries available for the method.')\n    shipping_methods = graphene.List(\n        ShippingMethod,\n        description=(\n            'List of shipping methods available for orders'\n            ' shipped to countries within this shipping zone.'))\n\n    class Meta:\n        description = \"\"\"\n            Represents a shipping zone in the shop. Zones are the concept\n            used only for grouping shipping methods in the dashboard,\n            and are never exposed to the customers directly.\"\"\"\n        model = models.ShippingZone\n        interfaces = [relay.Node]\n        filter_fields = {\n            'name': ['icontains'],\n            'countries': ['icontains'],\n            'shipping_methods__price': ['gte', 'lte']}\n\n    def resolve_price_range(self, info):\n        return self.price_range\n\n    def resolve_countries(self, info):\n        return [\n            CountryDisplay(code=country.code, country=country.name)\n            for country in self.countries]\n\n    def resolve_shipping_methods(self, info):\n        return self.shipping_methods.all()\n\n\nclass WeightScalar(Scalar):\n    @staticmethod\n    def parse_value(value):\n        \"\"\"Excepts value to be a string \"amount unit\"\n        separated by a single space.\n        \"\"\"\n        try:\n            value = decimal.Decimal(value)\n        except decimal.DecimalException:\n            return None\n        default_unit = get_default_weight_unit()\n        return Weight(**{default_unit: value})\n\n    @staticmethod\n    def serialize(weight):\n        if isinstance(weight, Weight):\n            default_unit = get_default_weight_unit()\n            if weight.unit != default_unit:\n                weight = convert_weight(weight, default_unit)\n            return str(weight)\n        return None\n\n    @staticmethod\n    def parse_literal(node):\n        return node\n", "path": "saleor/graphql/shipping/types.py"}]}