Remove create_root_type
-from dataclasses import field as dataclasses_field
from dataclasses import make_dataclass
-from typing import Type
import pydantic
import strawberry
@@ -9,22 +7,6 @@ from strawberry.field import StrawberryField
from .types import FieldError
-def create_root_type(fields: list[StrawberryField]) -> Type:
- cls = make_dataclass(
- "RootType",
- fields=[
- (
- field.graphql_name,
- field.type,
- dataclasses_field(default=field),
- ) # type: ignore
- for field in fields
- ],
- )
-
- return strawberry.type(cls)
-
-
def create_validation_error_type(prefix: str, type_: StrawberryField):
@classmethod
def from_validation_error(cls, validation_error: pydantic.ValidationError):
