Skip to content

Commit 70a6c72

Browse files
authored
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).
1 parent 5661db8 commit 70a6c72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorial-plain.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Create ``cookbook/ingredients/schema.py`` and type the following:
153153
model = Ingredient
154154
155155
156-
class Query(graphene.AbstractType):
156+
class Query(object):
157157
all_categories = graphene.List(CategoryType)
158158
all_ingredients = graphene.List(IngredientType)
159159
@@ -426,7 +426,7 @@ We can update our schema to support that, by adding new query for ``ingredient``
426426
model = Ingredient
427427
428428
429-
class Query(graphene.AbstractType):
429+
class Query(object):
430430
category = graphene.Field(CategoryType,
431431
id=graphene.Int(),
432432
name=graphene.String())

0 commit comments

Comments
 (0)