Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# cookbook/ingredients/
import graphene
from graphene_django.types import DjangoObjectType
from ingredients.models import Category, Ingredient
class CategoryType(DjangoObjectType):
class Meta:
model = Category
class IngredientType(DjangoObjectType):
class Meta:
model = Ingredient
class Query(object):
hello = graphene.String()
def resolve_hello(self, info, **kwargs):
return "world"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.