-
Notifications
You must be signed in to change notification settings - Fork 823
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
InputObjectType.__init_sublcass_with_meta__ skips Meta.fields attribute #1429
Comments
Do you have a case for using |
In my case, it was a creation of input fields dynamically based on a subset of model fields. I've tried to reproduce the Node behavior to keep things simple and DRY. Node behavior:
How I want Input to work (according to docs):
How it has to be solved right now:
This can be solved with some meta-programing but it leaves us with an overly complicated, hard-to-read hack. |
In
InputObjectType.__init_subclass_with_meta__
, thefields
of theMeta
class (passed as anoptions
arg) are never referenced. This in effect just skips them completely wich stands in contradiction to the docstring.InputObjectType
has to be subclassed and__init_subclass_with_meta__
has to be extended for this feature to work, like in graphene.tests.issues.test_720.If this is accepted I can do a PR for this along the lines:
The text was updated successfully, but these errors were encountered: