strawberry-graphql / strawberry

A GraphQL library for Python that leverages type annotations 🍓
https://strawberry.rocks
MIT License
3.92k stars 516 forks source link

Add ability to use strawberry mypy plugin with pydantic without pydantic mypy plugin #2073

Open benzolium opened 2 years ago

benzolium commented 2 years ago

Currently it's not possible not to use pydantic mypy plugin while using strawberry mypy plugin and experimental pydantic types.

It could be useful for users who do not want to enable pydantic plugin.

Feature Request Type

Description

Add ability to use strawberry mypy plugin with pydantic without pydantic mypy plugin

Upvote & Fund

Fund with Polar

patrick91 commented 1 year ago

@benzolium can you show me what happens when you only enable the strawberry plugin? does it crash?

benzolium commented 1 year ago

@patrick91 I'm getting:

error: Pydantic plugin not installed, please add pydantic.mypy your mypy.ini plugins

for every line with @strawberry.experimental.pydantic.type

nevoodoo commented 6 months ago

This is still a running issue...has anyone found a workaround to suppress the error in the meantime?