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.py
class Category(models.Model):
name = models.CharField(max_length=16)
# forms.py
from django import forms
from graphene_django.forms.mutation import DjangoModelFormMutation
class CategoryForm(forms.ModelForm):
class Meta:
model = Category
fields = ['name']
# schema.py
import graphene
from graphene_django_extras import DjangoObjectType
from .models import Category
from .forms import CategoryForm
class CategoryType(DjangoObjectType):
class Meta:
model = Category
class CreateCategoryMutation(DjangoModelFormMutation):
class Meta:
form_class = CategoryForm # <----- For some reason `CategoryType` is not register for the graphene_django package
class Mutation(graphene.Mutation):
create_category = CreateCategoryMutation.Field()
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