Removed abstract type from examples.

pull/366/merge
Syrus Akbary 4 years ago
parent 1e6b2a569e
commit 205c177912
  1. 2
      examples/cookbook-plain/cookbook/ingredients/schema.py
  2. 2
      examples/cookbook-plain/cookbook/recipes/schema.py
  3. 4
      examples/cookbook/cookbook/ingredients/schema.py
  4. 4
      examples/cookbook/cookbook/recipes/schema.py

@ -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…
Cancel
Save