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 had an issue that i can't fix.
I'm trying to use this package together with graphene-django defining types with the extra package and using DjangoModelFormMutation from the graphene-django package. But for some reason the types that I register using the extras class are not present for the other package.
Here is an example
# models.pyclassCategory(models.Model):
name=models.CharField(max_length=16)
# forms.pyfromdjangoimportformsfromgraphene_django.forms.mutationimportDjangoModelFormMutationclassCategoryForm(forms.ModelForm):
classMeta:
model=Categoryfields= ['name']
# schema.pyimportgraphenefromgraphene_django_extrasimportDjangoObjectTypefrom .modelsimportCategoryfrom .formsimportCategoryFormclassCategoryType(DjangoObjectType):
classMeta:
model=CategoryclassCreateCategoryMutation(DjangoModelFormMutation):
classMeta:
form_class=CategoryForm# <----- For some reason `CategoryType` is not register for the graphene_django packageclassMutation(graphene.Mutation):
create_category=CreateCategoryMutation.Field()
The text was updated successfully, but these errors were encountered:
I had an issue that i can't fix.
I'm trying to use this package together with
graphene-django
defining types with the extra package and usingDjangoModelFormMutation
from thegraphene-django
package. But for some reason the types that I register using theextras
class are not present for the other package.Here is an example
The text was updated successfully, but these errors were encountered: