mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-02-16 19:40:36 +03:00
Update documentation in tutorial to avoid positional argument error
This commit is contained in:
parent
283bccf9d3
commit
2f2673dc5e
|
@ -157,10 +157,10 @@ Create ``cookbook/ingredients/schema.py`` and type the following:
|
|||
all_categories = graphene.List(CategoryType)
|
||||
all_ingredients = graphene.List(IngredientType)
|
||||
|
||||
def resolve_all_categories(self, info, **kwargs):
|
||||
def resolve_all_categories(self, info, *args, **kwargs):
|
||||
return Category.objects.all()
|
||||
|
||||
def resolve_all_ingredients(self, info, **kwargs):
|
||||
def resolve_all_ingredients(self, info, *args, **kwargs):
|
||||
# We can easily optimize query count in the resolve method
|
||||
return Ingredient.objects.select_related('category').all()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user