-
Notifications
You must be signed in to change notification settings - Fork 824
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
Propagate arguments of relay.NodeField to Field #1036
Conversation
dac3d42
to
675743f
Compare
17820fc
to
8746230
Compare
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.
Thanks @tdiam ! I've added a small suggestion but other than that this looks good.
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.
Looks good 👍
Could we also merge this in the v2 branch? Some librairies (like graphene-django) are still relying on the v2... I created a pull request to cherry pick this into the v2 branch: #1307 |
* Propagate name, deprecation_reason arguments of relay.NodeField to Field * Allow custom description in Node.Field and move ID description to ID argument * Add test for Node.Field with custom name * Add tests for description, deprecation_reason arguments of NodeField * Pass all kwargs from NodeField to Field
* Propagate name, deprecation_reason arguments of relay.NodeField to Field * Allow custom description in Node.Field and move ID description to ID argument * Add test for Node.Field with custom name * Add tests for description, deprecation_reason arguments of NodeField * Pass all kwargs from NodeField to Field Co-authored-by: Theodore Diamantidis <diamaltho@gmail.com>
Closes #1035
Question: Should all
**kwargs
fromNodeField
's constructor be propagated or should there be any check to ensure the field gets no arguments other thanid
?Edit 1: I also moved the "The ID of the object" description to the ID argument instead of the whole Field, since it seemed more appropriate, and included
description
in the propagated arguments.