-
Notifications
You must be signed in to change notification settings - Fork 828
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
Argument default value should be undefined #1300
Argument default value should be undefined #1300
Conversation
d3ae179
to
11ef6e9
Compare
I am unsure which of the two options you want me to do to fix the unit tests. 1, set default values for the failing tests to be None. |
thumbs up for this PR! I would say remove the no longer passed in values from the assertion right? We're testing whether the value is absent if its not passed in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the commit to fix the test.
graphene/types/argument.py
Outdated
assert ( | ||
arg_name not in arguments | ||
), f'More than one Argument have same name "{arg_name}".' | ||
assert arg_name not in arguments, f'More than one Argument have same name "{arg_name}".' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is causing the test to fail. It applies black formatting to the code an fails if the file changes. This is where it cites the changed file: https://travis-ci.org/github/graphql-python/graphene/jobs/753187127#L243
d160186
to
acbd262
Compare
Ok I finally got around to cleaning up the changes that moving to Undefined makes to the unit tests. This should be good to go now. Fixed the fact I forgot to run pre-commit along the way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What's the updated on this one? |
+1 this seems like a critical feature |
Does this PR need any more work? I'd be happy to help, otherwise I would really appreciate this to make it into the next release 😃 |
any update? |
Hey everyone, Closing this. |
resolves #1195
This stops
null
from being populated in the introspection query as mentioned in #1195. This also solves the problem ofNone
being passed into the kwargs of amutate
call if no value was passed in by the end user.