You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm Trying to write a mutation for my model and The problem is how to validate the data that comes from the user.
In Django, which has forms (and modelForms) that you can create dynamically based on a model you have described, this problem is handled beautifully using DjangoFormMutation, with the help of graphene-django package (You can see an example here).
Is there a way for us in this package that help us implement our mongo document mutations this way?
I know we can create an Argument class and handle (and validate) fields there; but using that mechanism, we need to cast each field from graphene data object type to mongoengine document filed manually and that is somehow dirty.
Or more important, is there a way to dynamically generate Argument class Fields from mongoengine document ?
many thanks.
The text was updated successfully, but these errors were encountered:
I'm Trying to write a mutation for my model and The problem is how to validate the data that comes from the user.
In Django, which has forms (and modelForms) that you can create dynamically based on a model you have described, this problem is handled beautifully using DjangoFormMutation, with the help of graphene-django package (You can see an example here).
Is there a way for us in this package that help us implement our mongo document mutations this way?
I know we can create an Argument class and handle (and validate) fields there; but using that mechanism, we need to cast each field from graphene data object type to mongoengine document filed manually and that is somehow dirty.
Or more important, is there a way to dynamically generate Argument class Fields from mongoengine document ?
many thanks.
The text was updated successfully, but these errors were encountered: