mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 03:34:13 +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
|
model = Ingredient
|
||||||
|
|
||||||
|
|
||||||
class Query(graphene.AbstractType):
|
class Query(object):
|
||||||
category = graphene.Field(CategoryType,
|
category = graphene.Field(CategoryType,
|
||||||
id=graphene.Int(),
|
id=graphene.Int(),
|
||||||
name=graphene.String())
|
name=graphene.String())
|
||||||
|
|
|
@ -14,7 +14,7 @@ class RecipeIngredientType(DjangoObjectType):
|
||||||
model = RecipeIngredient
|
model = RecipeIngredient
|
||||||
|
|
||||||
|
|
||||||
class Query(graphene.AbstractType):
|
class Query(object):
|
||||||
recipe = graphene.Field(RecipeType,
|
recipe = graphene.Field(RecipeType,
|
||||||
id=graphene.Int(),
|
id=graphene.Int(),
|
||||||
title=graphene.String())
|
title=graphene.String())
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from cookbook.ingredients.models import Category, Ingredient
|
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.filter import DjangoFilterConnectionField
|
||||||
from graphene_django.types import DjangoObjectType
|
from graphene_django.types import DjangoObjectType
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class IngredientNode(DjangoObjectType):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Query(AbstractType):
|
class Query(object):
|
||||||
category = Node.Field(CategoryNode)
|
category = Node.Field(CategoryNode)
|
||||||
all_categories = DjangoFilterConnectionField(CategoryNode)
|
all_categories = DjangoFilterConnectionField(CategoryNode)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from cookbook.recipes.models import Recipe, RecipeIngredient
|
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.filter import DjangoFilterConnectionField
|
||||||
from graphene_django.types import DjangoObjectType
|
from graphene_django.types import DjangoObjectType
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ class RecipeIngredientNode(DjangoObjectType):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Query(AbstractType):
|
class Query(object):
|
||||||
recipe = Node.Field(RecipeNode)
|
recipe = Node.Field(RecipeNode)
|
||||||
all_recipes = DjangoFilterConnectionField(RecipeNode)
|
all_recipes = DjangoFilterConnectionField(RecipeNode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user