adding optional_field in Serializermutation to enfore some fields to be optional by mahmoudmostafa0 · Pull Request #1455 · graphql-python/graphene-django

@mahmoudmostafa0

i want to use rest_framework Serializermutation and i want to force some fields to be optional

@mahmoudmostafa0

@mahmoudmostafa0

@mahmoudmostafa0

this was available in v2 however i found it removed in v3

@mahmoudmostafa0

@mahmoudmostafa0 mahmoudmostafa0 changed the title adding optional_field to enfore some fields to be optional adding optional_field in Serializermutation to enfore some fields to be optional

Aug 25, 2023

kiendang

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mahmoudmostafa0. There's a small typo there. Also could you run the linting as well (tox -e pre-commit)?

Co-authored-by: Kien Dang <kiend@pm.me>

@mahmoudmostafa0

# Conflicts:
#	graphene_django/rest_framework/mutation.py

@mahmoudmostafa0

@mahmoudmostafa0

@mahmoudmostafa0

thanks @kiendang for reviewing I`ve tried out the linting and this is the final results I got :

check for merge conflicts................................................Passed
check json...............................................................Passed
check yaml...............................................................Passed
debug statements (python)................................................Passed
fix end of files.........................................................Passed
pretty format json.......................................................Passed
trim trailing whitespace.................................................Passed
black....................................................................Passed
ruff.....................................................................Passed
pre-commit: OK (6.86=setup[0.05]+cmd[6.81] seconds)
congratulations :) (9.61 seconds)

kiendang

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Need another set of eyes though.

This is the same as #1080 which was merged into v2.

firaskafri