Skip to content

Exposing Mypy-compatible type information #966

Closed
@ktosiek

Description

@ktosiek

I'd like to use Mypy for checking a Graphene-based app. Is anyone working on stubs, or even better - a Mypy plugin?

What I imagine is writing:

class Me(ObjectType[User]):
    full_name = graphene.String()
    def resolve_full_name(self, info):
        return self.get_full_name()

And getting a guarantee that User.get_full_name() returns something assignable to Optional[String].

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions