graphene icon indicating copy to clipboard operation
graphene copied to clipboard

Argument default value should be undefined

Open wakemaster39 opened this issue 3 years ago • 8 comments

resolves #1195

This stops null from being populated in the introspection query as mentioned in #1195. This also solves the problem of None being passed into the kwargs of a mutate call if no value was passed in by the end user.

wakemaster39 avatar Jan 06 '21 14:01 wakemaster39

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. 2, remove the no longer passed in values from the assertion statements.

wakemaster39 avatar Jan 06 '21 19:01 wakemaster39

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. 2, remove the no longer passed in values from the assertion statements.

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

DonQueso89 avatar Jan 28 '21 13:01 DonQueso89

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.

wakemaster39 avatar Mar 01 '21 13:03 wakemaster39

What's the updated on this one?

ramyak-mehra avatar May 10 '21 20:05 ramyak-mehra

+1 this seems like a critical feature

lovetoburnswhen avatar Jun 07 '21 16:06 lovetoburnswhen

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 😃

SteinRobert avatar Jul 05 '21 18:07 SteinRobert

any update?

frankchen211 avatar May 19 '22 02:05 frankchen211

@Cito @jkimbo you guys probably have a lot of work on your hands, thank you so much for caring about the project! Just wanted to check in whether this change is something you consider accepting or if it needs any more work. I'd surely help making any more changes if needed.

SteinRobert avatar Jun 08 '22 06:06 SteinRobert

Hey everyone, sorry for the long wait; this fix is already merged: https://github.com/graphql-python/graphene/commit/19ebf08339263f0446235ddffbbab0e6d3f11699 It should be included in 3.1.0

Closing this.

erikwrede avatar Aug 13 '22 13:08 erikwrede