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

Support pydantic date types

Open edmundhighcock opened this issue 1 year ago • 2 comments

Support the special type hints that pydantic provides to give more control over validating dates.

Enable Pydantic custom datetime type hints

Pydantic has some additional classes that you can use as type hints to give more control over validating dates.

https://docs.pydantic.dev/2.0/usage/types/datetime/#pydantic-date-types

edmundhighcock avatar Feb 17 '24 22:02 edmundhighcock

Thanks for this @edmundhighcock !

Could you please add some unit test coverage? This might be a good place to look: https://github.com/graphql-python/graphene-pydantic/blob/c1e47197fbacebe1fc586f2d33cde7fb70f0302a/tests/test_converters.py#L54-L67

dantheman39 avatar Feb 19 '24 16:02 dantheman39

Thanks for this @edmundhighcock !

Could you please add some unit test coverage? This might be a good place to look:

https://github.com/graphql-python/graphene-pydantic/blob/c1e47197fbacebe1fc586f2d33cde7fb70f0302a/tests/test_converters.py#L54-L67

Sorry for the slow reply. Yes, will happily do this as soon as I have time.

edmundhighcock avatar May 02 '24 07:05 edmundhighcock