Skip to content
Snippets Groups Projects
Unverified Commit 917898a0 authored by Tonye Jack's avatar Tonye Jack Committed by GitHub
Browse files

Update Query to inherit from graphene.ObjectType. (#68)

parent d988dec2
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ class IngredientType(DjangoObjectType): ...@@ -40,7 +40,7 @@ class IngredientType(DjangoObjectType):
model = Ingredient model = Ingredient
class Query(object): class Query(graphene.ObjectType):
all_categories = graphene.List(CategoryType) all_categories = graphene.List(CategoryType)
all_ingredients = graphene.List(IngredientType) all_ingredients = graphene.List(IngredientType)
...@@ -206,4 +206,4 @@ class Query(object): ...@@ -206,4 +206,4 @@ class Query(object):
def resolve_all_ingredients(root, info): def resolve_all_ingredients(root, info):
return gql_optimizer.query(Ingredient.objects.all(), info, disable_abort_only=True) return gql_optimizer.query(Ingredient.objects.all(), info, disable_abort_only=True)
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment