ObjectType instead of AbstractType

This commit is contained in:
Mauricio Cortazar 2018-04-26 22:54:03 -05:00 committed by GitHub
parent a480a39713
commit 789e3054ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
from cookbook.ingredients.models import Category, Ingredient
from graphene import AbstractType, Node
from graphene import ObjectType, Node
from graphene_django.filter import DjangoFilterConnectionField
from graphene_django.types import DjangoObjectType
@ -28,7 +28,7 @@ class IngredientNode(DjangoObjectType):
}
class Query(AbstractType):
class Query(ObjectType):
category = Node.Field(CategoryNode)
all_categories = DjangoFilterConnectionField(CategoryNode)