Open benzolium opened 2 years ago
I am also encountering the same issue because strawberry.auto
is not working, and setting the flag all_field=True
in strawberry.experimental.pydantic.type
has also failed.
Even when scalar_overrides
are set, strawberry.auto
still fails to resolve the type.
def create_schema() -> strawberry.Schema:
return strawberry.Schema(
query=Query,
mutation=Mutation,
scalar_overrides={SomeNameModel: SomeName},
)
Add way of using pydantic model scalars without manually defining fields - just by using
strawberry.auto
Feature Request Type
Description
I have a pydantic model, lets say:
And I have a scalar:
I have a model which has uses that scalar:
When I'm trying to create a type from it:
I'm getting an error:
If I change
User
to:I have a pydantic error:
However, this works (manual annotation of type):
Upvote & Fund