fixes #8, base import of field no longer works for query property. Use Node.Field instead

This commit is contained in:
chriscauley 2016-11-03 17:31:28 -04:00
parent a7caad0cf4
commit d3057cd9dc

View File

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