-
Notifications
You must be signed in to change notification settings - Fork 767
Fix passing required=True to DjangoConnectionField #609
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
Fix passing required=True to DjangoConnectionField #609
Conversation
3 similar comments
graphene_django/fields.py
Outdated
root, | ||
info, | ||
**args | ||
cls, |
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.
8 spaces should be 4!
@phalt Done! |
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.
This looks good to me - @alexkirsz this isn't a breaking change is it?
@phalt The previous behaviour was to raise an exception, so I don't believe there's any way in which this could break non-already broken code :) |
@alexkirsz approval from me then! |
Passing
required=True
to an instance ofDjangoConnectionField
currently raises the following exception:The reason for the exception is that DjangoConnectionField does not expect its
type
to be wrapped in aNonNull
instance. This PR ensures that it handles that case properly.