mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-30 19:24:08 +03:00
fixes #8, base import of field no longer works for query property. Use Node.Field instead
This commit is contained in:
parent
a7caad0cf4
commit
d3057cd9dc
|
@ -1,5 +1,5 @@
|
|||
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.types import DjangoObjectType
|
||||
|
||||
|
@ -31,8 +31,8 @@ class IngredientNode(DjangoObjectType):
|
|||
|
||||
|
||||
class Query(AbstractType):
|
||||
category = Field(CategoryNode)
|
||||
category = Node.Field(CategoryNode)
|
||||
all_categories = DjangoFilterConnectionField(CategoryNode)
|
||||
|
||||
ingredient = Field(IngredientNode)
|
||||
ingredient = Node.Field(IngredientNode)
|
||||
all_ingredients = DjangoFilterConnectionField(IngredientNode)
|
||||
|
|
Loading…
Reference in New Issue
Block a user