Skip to content

Support for Pydantic Dataclass #26

Open
@matt-koevort

Description

@matt-koevort

Dataclasses are really useful in some instances. Pydantic has a drop-in replacement for dataclasses - but does not seem to supported by this library. Not sure how difficult it would be to include it? I know the classes have a __pydantic_model__ variable.

Activity

necaris

necaris commented on May 9, 2020

@necaris
Collaborator

That's an interesting idea -- we haven't really looked into that. Supporting standard library dataclasses is a little out of the scope of this library IMHO, but Pydantic dataclasses should be easier to handle if they're easy to map to a Pydantic model.

I don't have a specific use case for Pydantic at my current work, so I'm not able to spend much time on it -- if you'd be interested in looking into it I'd be happy to help however I can, though! Otherwise I'm not sure when I'll be able to look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Support for Pydantic Dataclass · Issue #26 · graphql-python/graphene-pydantic