mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-30 19:24:08 +03:00
Removed abstract type from examples.
This commit is contained in:
parent
1e6b2a569e
commit
205c177912
|
@ -14,7 +14,7 @@ class IngredientType(DjangoObjectType):
|
|||
model = Ingredient
|
||||
|
||||
|
||||
class Query(graphene.AbstractType):
|
||||
class Query(object):
|
||||
category = graphene.Field(CategoryType,
|
||||
id=graphene.Int(),
|
||||
name=graphene.String())
|
||||
|
|
|
@ -14,7 +14,7 @@ class RecipeIngredientType(DjangoObjectType):
|
|||
model = RecipeIngredient
|
||||
|
||||
|
||||
class Query(graphene.AbstractType):
|
||||
class Query(object):
|
||||
recipe = graphene.Field(RecipeType,
|
||||
id=graphene.Int(),
|
||||
title=graphene.String())
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from cookbook.ingredients.models import Category, Ingredient
|
||||
from graphene import AbstractType, Node
|
||||
from graphene import 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(object):
|
||||
category = Node.Field(CategoryNode)
|
||||
all_categories = DjangoFilterConnectionField(CategoryNode)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from cookbook.recipes.models import Recipe, RecipeIngredient
|
||||
from graphene import AbstractType, Node
|
||||
from graphene import Node
|
||||
from graphene_django.filter import DjangoFilterConnectionField
|
||||
from graphene_django.types import DjangoObjectType
|
||||
|
||||
|
@ -24,7 +24,7 @@ class RecipeIngredientNode(DjangoObjectType):
|
|||
}
|
||||
|
||||
|
||||
class Query(AbstractType):
|
||||
class Query(object):
|
||||
recipe = Node.Field(RecipeNode)
|
||||
all_recipes = DjangoFilterConnectionField(RecipeNode)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user