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

Several features to improve compatibility with pidantic

Open dima-dmytruk23 opened this issue 2 years ago • 3 comments

@necaris I have some requirements on a project that graphene-pydantic==0.3.0 doesn't support.

  1. In mutations - those fields that were not passed - still come as None. As a result, when parsing a dictionary into a Type[BaseModel], these fields are also passed through and an entry is added to the database with these values. exclude_default, exclude_unset - don't work. It is not correct.
  2. If null comes from the client to the Int field - I get an error. The field must be nullable.
  3. Pass empty strings as null in Output.

I corrected them - https://github.com/graphql-python/graphene-pydantic/pull/75

dima-dmytruk23 avatar Apr 23 '22 10:04 dima-dmytruk23

@dima-dmytruk23 if you have fixes for these issues it's definitely worth making a PR!

necaris avatar Apr 23 '22 20:04 necaris

@dima-dmytruk23 if you have fixes for these issues it's definitely worth making a PR!

Ok. Created PR.

dima-dmytruk23 avatar Apr 24 '22 01:04 dima-dmytruk23

@necaris you can see this

https://github.com/graphql-python/graphql-core/issues/170#issuecomment-1120402616

dima-dmytruk23 avatar May 08 '22 20:05 dima-dmytruk23