-
Notifications
You must be signed in to change notification settings - Fork 227
Generate Mutation input from Model #212
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
Comments
Not at the moment. If you're interested in contributing to this, feel free to start a design conversation outlining your approach. Cheers. |
FWIW I've started basing my mutations off methods in my model, with the hopes that they will be automagically generated leveraging Python 3.6 typing to handle argument generation in the future. class MyModel(Base):
# ... fields
def create(self, foo: String, bar:Optional[String] = None):
# ...
# would imply
class CreateMyModel(graphene.Mutation):
class Arguments:
foo = graphene.String(required=True)
bar = graphene.String()
myModel = # node for my model
def mutate(self, info, **kwargs):
return CreateMyModel(myModel=MyModel.create(**kwargs)) |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue. |
Is there a way to have something like this ?
The text was updated successfully, but these errors were encountered: