Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding optional_field in Serializermutation to enfore some fields to be optional #1455

Merged
merged 8 commits into from Aug 27, 2023

Conversation

mahmoudmostafa0
Copy link
Contributor

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

@mahmoudmostafa0
Copy link
Contributor Author

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

@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
Copy link
Collaborator

@kiendang kiendang left a comment

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)?

graphene_django/rest_framework/mutation.py Outdated Show resolved Hide resolved
mahmoudmostafa0 and others added 5 commits August 26, 2023 11:20
Co-authored-by: Kien Dang <kiend@pm.me>
# Conflicts:
#	graphene_django/rest_framework/mutation.py
@mahmoudmostafa0
Copy link
Contributor Author

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)

Copy link
Collaborator

@kiendang kiendang left a comment

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 firaskafri merged commit e49a01c into graphql-python:main Aug 27, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants