Given the following code.
import strawberry
from pydantic import BaseModel
class Example(BaseModel):
name: str
@strawberry.experimental.pydantic.input(model=Example)
class ExampleInput:
name: strawberry.auto
@strawberry.mutation(name='createExample')
async def create_example(input: ExampleInput) -> None:
input.to_pydantic()
Pylance (aka VSCode) will return an error on to_pydantic()
Type of "to_pydantic" is partially unknown
Type of "to_pydantic" is "(**kwargs: Unknown) -> Example"
Pylance(reportUnknownMemberType)
This seems to be happening because **kwargs
is inherently untyped.
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