graphene-pydantic icon indicating copy to clipboard operation
graphene-pydantic copied to clipboard

Support for Pydantic Dataclass

Open matt-koevort opened this issue 5 years ago • 1 comments

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.

matt-koevort avatar May 07 '20 12:05 matt-koevort

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.

necaris avatar May 09 '20 19:05 necaris