It would be nice if strawberry's support for pydantic included models defined using pydantic.dataclasses.dataclass
(and not just those that inherit from pydantic.BaseModel
. At present, this gives an error:
from pydantic.dataclasses import dataclass
import strawberry
@dataclass
class Foo_:
bar: str
@strawberry.experimental.pydantic.type(model=Foo_, all_fields=True)
class Foo:
pass
AttributeError: type object 'Foo_' has no attribute '__fields__'
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too