mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-01-31 03:34:13 +03:00
Docs: fix usage of deprecated AbstractType
A tutorial still used `graphene.AbstractType` instead of `object`, which leads to a [deprecation warning](https://github.com/graphql-python/graphene/blob/master/UPGRADE-v2.0.md#abstracttype-deprecated).
This commit is contained in:
parent
5661db88d1
commit
70a6c72751
|
@ -153,7 +153,7 @@ Create ``cookbook/ingredients/schema.py`` and type the following:
|
||||||
model = Ingredient
|
model = Ingredient
|
||||||
|
|
||||||
|
|
||||||
class Query(graphene.AbstractType):
|
class Query(object):
|
||||||
all_categories = graphene.List(CategoryType)
|
all_categories = graphene.List(CategoryType)
|
||||||
all_ingredients = graphene.List(IngredientType)
|
all_ingredients = graphene.List(IngredientType)
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ We can update our schema to support that, by adding new query for ``ingredient``
|
||||||
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())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user