We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unable to use Unions with Generics
## Describe the Bug

Not sure if it is a bug or something non supported but when passing a union to a generic type strawberry is unable to initialize the schema.

The following example would work using a single strawberry type with Connection, but it fails when using an union 


```python
from typing import Generic, TypeVar, Union
import strawberry

T = TypeVar("T")


@strawberry.type
class Edge(Generic[T]):
    cursor: str
    node: T


@strawberry.type
class Connection(Generic[T]):
    edges: list["Edge[T]"]


@strawberry.type
class Entity1:
    id: int


@strawberry.type
class Entity2:
    id: int


Entities = Union[Entity1, Entity2]


@strawberry.type
class Query:
    @strawberry.field
    def entities(self) -> Connection[Entities]:
        return Connection(
            edges=[
                Edge(
                    cursor="1",
                    node=Entity1(id=1),
                ),
                Edge(
                    cursor="2",
                    node=Entity2(id=2),
                ),
            ],
        )


schema = strawberry.Schema(Query)
print(schema.execute_sync("{ entities { __typename } }"))

```
error
```
raise cls(f"{self.name} fields cannot be resolved. {error}") from error
TypeError: Query fields cannot be resolved.
```


## System Information

 - Operating system:
 - Strawberry version (if applicable): 0.208.1


<!-- POLAR PLEDGE BADGE START -->
## Upvote & Fund

- We're using [Polar.sh](https://polar.sh/strawberry-graphql) so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.

<a href="https://polar.sh/strawberry-graphql/strawberry/issues/3098">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3098/pledge.svg?darkmode=1">
  <img alt="Fund with Polar" src="https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3098/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `strawberry/schema/name_converter.py`
Content:
```
1 from __future__ import annotations
2 
3 from typing import TYPE_CHECKING, List, Optional, Union, cast
4 from typing_extensions import Protocol
5 
6 from strawberry.custom_scalar import ScalarDefinition
7 from strawberry.directive import StrawberryDirective
8 from strawberry.enum import EnumDefinition, EnumValue
9 from strawberry.lazy_type import LazyType
10 from strawberry.schema_directive import StrawberrySchemaDirective
11 from strawberry.type import (
12     StrawberryList,
13     StrawberryOptional,
14     has_object_definition,
15 )
16 from strawberry.types.types import StrawberryObjectDefinition
17 from strawberry.union import StrawberryUnion
18 from strawberry.utils.str_converters import capitalize_first, to_camel_case
19 from strawberry.utils.typing import eval_type
20 
21 if TYPE_CHECKING:
22     from strawberry.arguments import StrawberryArgument
23     from strawberry.field import StrawberryField
24     from strawberry.type import StrawberryType
25 
26 
27 class HasGraphQLName(Protocol):
28     python_name: str
29     graphql_name: Optional[str]
30 
31 
32 class NameConverter:
33     def __init__(self, auto_camel_case: bool = True) -> None:
34         self.auto_camel_case = auto_camel_case
35 
36     def apply_naming_config(self, name: str) -> str:
37         if self.auto_camel_case:
38             name = to_camel_case(name)
39 
40         return name
41 
42     def from_type(
43         self,
44         type_: Union[StrawberryType, StrawberryDirective],
45     ) -> str:
46         if isinstance(type_, (StrawberryDirective, StrawberrySchemaDirective)):
47             return self.from_directive(type_)
48         if isinstance(type_, EnumDefinition):  # TODO: Replace with StrawberryEnum
49             return self.from_enum(type_)
50         elif isinstance(type_, StrawberryObjectDefinition):
51             if type_.is_input:
52                 return self.from_input_object(type_)
53             if type_.is_interface:
54                 return self.from_interface(type_)
55             return self.from_object(type_)
56         elif isinstance(type_, StrawberryUnion):
57             return self.from_union(type_)
58         elif isinstance(type_, ScalarDefinition):  # TODO: Replace with StrawberryScalar
59             return self.from_scalar(type_)
60         else:
61             return str(type_)
62 
63     def from_argument(self, argument: StrawberryArgument) -> str:
64         return self.get_graphql_name(argument)
65 
66     def from_object(self, object_type: StrawberryObjectDefinition) -> str:
67         # if concrete_of is not generic, than this is a subclass of an already
68         # especialized type.
69         if object_type.concrete_of and object_type.concrete_of.is_generic:
70             return self.from_generic(
71                 object_type, list(object_type.type_var_map.values())
72             )
73 
74         return object_type.name
75 
76     def from_input_object(self, input_type: StrawberryObjectDefinition) -> str:
77         return self.from_object(input_type)
78 
79     def from_interface(self, interface: StrawberryObjectDefinition) -> str:
80         return self.from_object(interface)
81 
82     def from_enum(self, enum: EnumDefinition) -> str:
83         return enum.name
84 
85     def from_enum_value(self, enum: EnumDefinition, enum_value: EnumValue) -> str:
86         return enum_value.name
87 
88     def from_directive(
89         self, directive: Union[StrawberryDirective, StrawberrySchemaDirective]
90     ) -> str:
91         name = self.get_graphql_name(directive)
92 
93         if self.auto_camel_case:
94             # we don't want the first letter to be uppercase for directives
95             return name[0].lower() + name[1:]
96 
97         return name
98 
99     def from_scalar(self, scalar: ScalarDefinition) -> str:
100         return scalar.name
101 
102     def from_field(self, field: StrawberryField) -> str:
103         return self.get_graphql_name(field)
104 
105     def from_union(self, union: StrawberryUnion) -> str:
106         if union.graphql_name is not None:
107             return union.graphql_name
108 
109         name = ""
110 
111         for type_ in union.types:
112             if isinstance(type_, LazyType):
113                 type_ = cast("StrawberryType", type_.resolve_type())  # noqa: PLW2901
114 
115             if has_object_definition(type_):
116                 type_name = self.from_type(type_.__strawberry_definition__)
117             else:
118                 # This should only be hit when generating names for type-related
119                 # exceptions
120                 type_name = self.from_type(type_)
121 
122             name += type_name
123 
124         return name
125 
126     def from_generic(
127         self,
128         generic_type: StrawberryObjectDefinition,
129         types: List[Union[StrawberryType, type]],
130     ) -> str:
131         generic_type_name = generic_type.name
132 
133         names: List[str] = []
134 
135         for type_ in types:
136             name = self.get_from_type(type_)
137             names.append(name)
138 
139         return "".join(names) + generic_type_name
140 
141     def get_from_type(self, type_: Union[StrawberryType, type]) -> str:
142         type_ = eval_type(type_)
143 
144         if isinstance(type_, LazyType):
145             name = type_.type_name
146         elif isinstance(type_, EnumDefinition):
147             name = type_.name
148         elif isinstance(type_, StrawberryUnion):
149             # TODO: test Generics with unnamed unions
150             assert type_.graphql_name
151 
152             name = type_.graphql_name
153         elif isinstance(type_, StrawberryList):
154             name = self.get_from_type(type_.of_type) + "List"
155         elif isinstance(type_, StrawberryOptional):
156             name = self.get_from_type(type_.of_type) + "Optional"
157         elif hasattr(type_, "_scalar_definition"):
158             strawberry_type = type_._scalar_definition
159 
160             name = strawberry_type.name
161         elif has_object_definition(type_):
162             strawberry_type = type_.__strawberry_definition__
163 
164             if (
165                 strawberry_type.is_generic
166                 and not strawberry_type.is_specialized_generic
167             ):
168                 types = type_.__args__  # type: ignore
169                 name = self.from_generic(strawberry_type, types)
170             elif (
171                 strawberry_type.concrete_of
172                 and not strawberry_type.is_specialized_generic
173             ):
174                 types = list(strawberry_type.type_var_map.values())
175                 name = self.from_generic(strawberry_type, types)
176             else:
177                 name = strawberry_type.name
178         else:
179             name = type_.__name__
180 
181         return capitalize_first(name)
182 
183     def get_graphql_name(self, obj: HasGraphQLName) -> str:
184         if obj.graphql_name is not None:
185             return obj.graphql_name
186 
187         assert obj.python_name
188 
189         return self.apply_naming_config(obj.python_name)
190
```
--- 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/strawberry/schema/name_converter.py b/strawberry/schema/name_converter.py
--- a/strawberry/schema/name_converter.py
+++ b/strawberry/schema/name_converter.py
@@ -146,10 +146,7 @@
         elif isinstance(type_, EnumDefinition):
             name = type_.name
         elif isinstance(type_, StrawberryUnion):
-            # TODO: test Generics with unnamed unions
-            assert type_.graphql_name
-
-            name = type_.graphql_name
+            name = type_.graphql_name if type_.graphql_name else self.from_union(type_)
         elif isinstance(type_, StrawberryList):
             name = self.get_from_type(type_.of_type) + "List"
         elif isinstance(type_, StrawberryOptional):

{"golden_diff": "diff --git a/strawberry/schema/name_converter.py b/strawberry/schema/name_converter.py\n--- a/strawberry/schema/name_converter.py\n+++ b/strawberry/schema/name_converter.py\n@@ -146,10 +146,7 @@\n         elif isinstance(type_, EnumDefinition):\n             name = type_.name\n         elif isinstance(type_, StrawberryUnion):\n-            # TODO: test Generics with unnamed unions\n-            assert type_.graphql_name\n-\n-            name = type_.graphql_name\n+            name = type_.graphql_name if type_.graphql_name else self.from_union(type_)\n         elif isinstance(type_, StrawberryList):\n             name = self.get_from_type(type_.of_type) + \"List\"\n         elif isinstance(type_, StrawberryOptional):\n", "issue": "Unable to use Unions with Generics\n## Describe the Bug\r\n\r\nNot sure if it is a bug or something non supported but when passing a union to a generic type strawberry is unable to initialize the schema.\r\n\r\nThe following example would work using a single strawberry type with Connection, but it fails when using an union \r\n\r\n\r\n```python\r\nfrom typing import Generic, TypeVar, Union\r\nimport strawberry\r\n\r\nT = TypeVar(\"T\")\r\n\r\n\r\n@strawberry.type\r\nclass Edge(Generic[T]):\r\n    cursor: str\r\n    node: T\r\n\r\n\r\n@strawberry.type\r\nclass Connection(Generic[T]):\r\n    edges: list[\"Edge[T]\"]\r\n\r\n\r\n@strawberry.type\r\nclass Entity1:\r\n    id: int\r\n\r\n\r\n@strawberry.type\r\nclass Entity2:\r\n    id: int\r\n\r\n\r\nEntities = Union[Entity1, Entity2]\r\n\r\n\r\n@strawberry.type\r\nclass Query:\r\n    @strawberry.field\r\n    def entities(self) -> Connection[Entities]:\r\n        return Connection(\r\n            edges=[\r\n                Edge(\r\n                    cursor=\"1\",\r\n                    node=Entity1(id=1),\r\n                ),\r\n                Edge(\r\n                    cursor=\"2\",\r\n                    node=Entity2(id=2),\r\n                ),\r\n            ],\r\n        )\r\n\r\n\r\nschema = strawberry.Schema(Query)\r\nprint(schema.execute_sync(\"{ entities { __typename } }\"))\r\n\r\n```\r\nerror\r\n```\r\nraise cls(f\"{self.name} fields cannot be resolved. {error}\") from error\r\nTypeError: Query fields cannot be resolved.\r\n```\r\n\r\n\r\n## System Information\r\n\r\n - Operating system:\r\n - Strawberry version (if applicable): 0.208.1\r\n\n\n<!-- POLAR PLEDGE BADGE START -->\n## Upvote & Fund\n\n- We're using [Polar.sh](https://polar.sh/strawberry-graphql) so you can upvote and help fund this issue.\n- We receive the funding once the issue is completed & confirmed by you.\n- Thank you in advance for helping prioritize & fund our backlog.\n\n<a href=\"https://polar.sh/strawberry-graphql/strawberry/issues/3098\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3098/pledge.svg?darkmode=1\">\n  <img alt=\"Fund with Polar\" src=\"https://polar.sh/api/github/strawberry-graphql/strawberry/issues/3098/pledge.svg\">\n</picture>\n</a>\n<!-- POLAR PLEDGE BADGE END -->\n\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, List, Optional, Union, cast\nfrom typing_extensions import Protocol\n\nfrom strawberry.custom_scalar import ScalarDefinition\nfrom strawberry.directive import StrawberryDirective\nfrom strawberry.enum import EnumDefinition, EnumValue\nfrom strawberry.lazy_type import LazyType\nfrom strawberry.schema_directive import StrawberrySchemaDirective\nfrom strawberry.type import (\n    StrawberryList,\n    StrawberryOptional,\n    has_object_definition,\n)\nfrom strawberry.types.types import StrawberryObjectDefinition\nfrom strawberry.union import StrawberryUnion\nfrom strawberry.utils.str_converters import capitalize_first, to_camel_case\nfrom strawberry.utils.typing import eval_type\n\nif TYPE_CHECKING:\n    from strawberry.arguments import StrawberryArgument\n    from strawberry.field import StrawberryField\n    from strawberry.type import StrawberryType\n\n\nclass HasGraphQLName(Protocol):\n    python_name: str\n    graphql_name: Optional[str]\n\n\nclass NameConverter:\n    def __init__(self, auto_camel_case: bool = True) -> None:\n        self.auto_camel_case = auto_camel_case\n\n    def apply_naming_config(self, name: str) -> str:\n        if self.auto_camel_case:\n            name = to_camel_case(name)\n\n        return name\n\n    def from_type(\n        self,\n        type_: Union[StrawberryType, StrawberryDirective],\n    ) -> str:\n        if isinstance(type_, (StrawberryDirective, StrawberrySchemaDirective)):\n            return self.from_directive(type_)\n        if isinstance(type_, EnumDefinition):  # TODO: Replace with StrawberryEnum\n            return self.from_enum(type_)\n        elif isinstance(type_, StrawberryObjectDefinition):\n            if type_.is_input:\n                return self.from_input_object(type_)\n            if type_.is_interface:\n                return self.from_interface(type_)\n            return self.from_object(type_)\n        elif isinstance(type_, StrawberryUnion):\n            return self.from_union(type_)\n        elif isinstance(type_, ScalarDefinition):  # TODO: Replace with StrawberryScalar\n            return self.from_scalar(type_)\n        else:\n            return str(type_)\n\n    def from_argument(self, argument: StrawberryArgument) -> str:\n        return self.get_graphql_name(argument)\n\n    def from_object(self, object_type: StrawberryObjectDefinition) -> str:\n        # if concrete_of is not generic, than this is a subclass of an already\n        # especialized type.\n        if object_type.concrete_of and object_type.concrete_of.is_generic:\n            return self.from_generic(\n                object_type, list(object_type.type_var_map.values())\n            )\n\n        return object_type.name\n\n    def from_input_object(self, input_type: StrawberryObjectDefinition) -> str:\n        return self.from_object(input_type)\n\n    def from_interface(self, interface: StrawberryObjectDefinition) -> str:\n        return self.from_object(interface)\n\n    def from_enum(self, enum: EnumDefinition) -> str:\n        return enum.name\n\n    def from_enum_value(self, enum: EnumDefinition, enum_value: EnumValue) -> str:\n        return enum_value.name\n\n    def from_directive(\n        self, directive: Union[StrawberryDirective, StrawberrySchemaDirective]\n    ) -> str:\n        name = self.get_graphql_name(directive)\n\n        if self.auto_camel_case:\n            # we don't want the first letter to be uppercase for directives\n            return name[0].lower() + name[1:]\n\n        return name\n\n    def from_scalar(self, scalar: ScalarDefinition) -> str:\n        return scalar.name\n\n    def from_field(self, field: StrawberryField) -> str:\n        return self.get_graphql_name(field)\n\n    def from_union(self, union: StrawberryUnion) -> str:\n        if union.graphql_name is not None:\n            return union.graphql_name\n\n        name = \"\"\n\n        for type_ in union.types:\n            if isinstance(type_, LazyType):\n                type_ = cast(\"StrawberryType\", type_.resolve_type())  # noqa: PLW2901\n\n            if has_object_definition(type_):\n                type_name = self.from_type(type_.__strawberry_definition__)\n            else:\n                # This should only be hit when generating names for type-related\n                # exceptions\n                type_name = self.from_type(type_)\n\n            name += type_name\n\n        return name\n\n    def from_generic(\n        self,\n        generic_type: StrawberryObjectDefinition,\n        types: List[Union[StrawberryType, type]],\n    ) -> str:\n        generic_type_name = generic_type.name\n\n        names: List[str] = []\n\n        for type_ in types:\n            name = self.get_from_type(type_)\n            names.append(name)\n\n        return \"\".join(names) + generic_type_name\n\n    def get_from_type(self, type_: Union[StrawberryType, type]) -> str:\n        type_ = eval_type(type_)\n\n        if isinstance(type_, LazyType):\n            name = type_.type_name\n        elif isinstance(type_, EnumDefinition):\n            name = type_.name\n        elif isinstance(type_, StrawberryUnion):\n            # TODO: test Generics with unnamed unions\n            assert type_.graphql_name\n\n            name = type_.graphql_name\n        elif isinstance(type_, StrawberryList):\n            name = self.get_from_type(type_.of_type) + \"List\"\n        elif isinstance(type_, StrawberryOptional):\n            name = self.get_from_type(type_.of_type) + \"Optional\"\n        elif hasattr(type_, \"_scalar_definition\"):\n            strawberry_type = type_._scalar_definition\n\n            name = strawberry_type.name\n        elif has_object_definition(type_):\n            strawberry_type = type_.__strawberry_definition__\n\n            if (\n                strawberry_type.is_generic\n                and not strawberry_type.is_specialized_generic\n            ):\n                types = type_.__args__  # type: ignore\n                name = self.from_generic(strawberry_type, types)\n            elif (\n                strawberry_type.concrete_of\n                and not strawberry_type.is_specialized_generic\n            ):\n                types = list(strawberry_type.type_var_map.values())\n                name = self.from_generic(strawberry_type, types)\n            else:\n                name = strawberry_type.name\n        else:\n            name = type_.__name__\n\n        return capitalize_first(name)\n\n    def get_graphql_name(self, obj: HasGraphQLName) -> str:\n        if obj.graphql_name is not None:\n            return obj.graphql_name\n\n        assert obj.python_name\n\n        return self.apply_naming_config(obj.python_name)\n", "path": "strawberry/schema/name_converter.py"}], "after_files": [{"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, List, Optional, Union, cast\nfrom typing_extensions import Protocol\n\nfrom strawberry.custom_scalar import ScalarDefinition\nfrom strawberry.directive import StrawberryDirective\nfrom strawberry.enum import EnumDefinition, EnumValue\nfrom strawberry.lazy_type import LazyType\nfrom strawberry.schema_directive import StrawberrySchemaDirective\nfrom strawberry.type import (\n    StrawberryList,\n    StrawberryOptional,\n    has_object_definition,\n)\nfrom strawberry.types.types import StrawberryObjectDefinition\nfrom strawberry.union import StrawberryUnion\nfrom strawberry.utils.str_converters import capitalize_first, to_camel_case\nfrom strawberry.utils.typing import eval_type\n\nif TYPE_CHECKING:\n    from strawberry.arguments import StrawberryArgument\n    from strawberry.field import StrawberryField\n    from strawberry.type import StrawberryType\n\n\nclass HasGraphQLName(Protocol):\n    python_name: str\n    graphql_name: Optional[str]\n\n\nclass NameConverter:\n    def __init__(self, auto_camel_case: bool = True) -> None:\n        self.auto_camel_case = auto_camel_case\n\n    def apply_naming_config(self, name: str) -> str:\n        if self.auto_camel_case:\n            name = to_camel_case(name)\n\n        return name\n\n    def from_type(\n        self,\n        type_: Union[StrawberryType, StrawberryDirective],\n    ) -> str:\n        if isinstance(type_, (StrawberryDirective, StrawberrySchemaDirective)):\n            return self.from_directive(type_)\n        if isinstance(type_, EnumDefinition):  # TODO: Replace with StrawberryEnum\n            return self.from_enum(type_)\n        elif isinstance(type_, StrawberryObjectDefinition):\n            if type_.is_input:\n                return self.from_input_object(type_)\n            if type_.is_interface:\n                return self.from_interface(type_)\n            return self.from_object(type_)\n        elif isinstance(type_, StrawberryUnion):\n            return self.from_union(type_)\n        elif isinstance(type_, ScalarDefinition):  # TODO: Replace with StrawberryScalar\n            return self.from_scalar(type_)\n        else:\n            return str(type_)\n\n    def from_argument(self, argument: StrawberryArgument) -> str:\n        return self.get_graphql_name(argument)\n\n    def from_object(self, object_type: StrawberryObjectDefinition) -> str:\n        # if concrete_of is not generic, than this is a subclass of an already\n        # especialized type.\n        if object_type.concrete_of and object_type.concrete_of.is_generic:\n            return self.from_generic(\n                object_type, list(object_type.type_var_map.values())\n            )\n\n        return object_type.name\n\n    def from_input_object(self, input_type: StrawberryObjectDefinition) -> str:\n        return self.from_object(input_type)\n\n    def from_interface(self, interface: StrawberryObjectDefinition) -> str:\n        return self.from_object(interface)\n\n    def from_enum(self, enum: EnumDefinition) -> str:\n        return enum.name\n\n    def from_enum_value(self, enum: EnumDefinition, enum_value: EnumValue) -> str:\n        return enum_value.name\n\n    def from_directive(\n        self, directive: Union[StrawberryDirective, StrawberrySchemaDirective]\n    ) -> str:\n        name = self.get_graphql_name(directive)\n\n        if self.auto_camel_case:\n            # we don't want the first letter to be uppercase for directives\n            return name[0].lower() + name[1:]\n\n        return name\n\n    def from_scalar(self, scalar: ScalarDefinition) -> str:\n        return scalar.name\n\n    def from_field(self, field: StrawberryField) -> str:\n        return self.get_graphql_name(field)\n\n    def from_union(self, union: StrawberryUnion) -> str:\n        if union.graphql_name is not None:\n            return union.graphql_name\n\n        name = \"\"\n\n        for type_ in union.types:\n            if isinstance(type_, LazyType):\n                type_ = cast(\"StrawberryType\", type_.resolve_type())  # noqa: PLW2901\n\n            if has_object_definition(type_):\n                type_name = self.from_type(type_.__strawberry_definition__)\n            else:\n                # This should only be hit when generating names for type-related\n                # exceptions\n                type_name = self.from_type(type_)\n\n            name += type_name\n\n        return name\n\n    def from_generic(\n        self,\n        generic_type: StrawberryObjectDefinition,\n        types: List[Union[StrawberryType, type]],\n    ) -> str:\n        generic_type_name = generic_type.name\n\n        names: List[str] = []\n\n        for type_ in types:\n            name = self.get_from_type(type_)\n            names.append(name)\n\n        return \"\".join(names) + generic_type_name\n\n    def get_from_type(self, type_: Union[StrawberryType, type]) -> str:\n        type_ = eval_type(type_)\n\n        if isinstance(type_, LazyType):\n            name = type_.type_name\n        elif isinstance(type_, EnumDefinition):\n            name = type_.name\n        elif isinstance(type_, StrawberryUnion):\n            name = type_.graphql_name if type_.graphql_name else self.from_union(type_)\n        elif isinstance(type_, StrawberryList):\n            name = self.get_from_type(type_.of_type) + \"List\"\n        elif isinstance(type_, StrawberryOptional):\n            name = self.get_from_type(type_.of_type) + \"Optional\"\n        elif hasattr(type_, \"_scalar_definition\"):\n            strawberry_type = type_._scalar_definition\n\n            name = strawberry_type.name\n        elif has_object_definition(type_):\n            strawberry_type = type_.__strawberry_definition__\n\n            if (\n                strawberry_type.is_generic\n                and not strawberry_type.is_specialized_generic\n            ):\n                types = type_.__args__  # type: ignore\n                name = self.from_generic(strawberry_type, types)\n            elif (\n                strawberry_type.concrete_of\n                and not strawberry_type.is_specialized_generic\n            ):\n                types = list(strawberry_type.type_var_map.values())\n                name = self.from_generic(strawberry_type, types)\n            else:\n                name = strawberry_type.name\n        else:\n            name = type_.__name__\n\n        return capitalize_first(name)\n\n    def get_graphql_name(self, obj: HasGraphQLName) -> str:\n        if obj.graphql_name is not None:\n            return obj.graphql_name\n\n        assert obj.python_name\n\n        return self.apply_naming_config(obj.python_name)\n", "path": "strawberry/schema/name_converter.py"}]}