diff --git a/examples/cookbook/cookbook/recipes/schema.py~ b/examples/cookbook/cookbook/recipes/schema.py~ deleted file mode 100644 index 6bd1541..0000000 --- a/examples/cookbook/cookbook/recipes/schema.py~ +++ /dev/null @@ -1,33 +0,0 @@ -from cookbook.ingredients.models import Recipe, Ingredient -from graphene import AbstractType, Node -from graphene_django.filter import DjangoFilterConnectionField -from graphene_django.types import DjangoObjectType - -class RecipeNode(DjangoObjectType): - - class Meta: - model = Recipe - interfaces = (Node, ) - filter_fields = ['name', 'ingredients'] - filter_order_by = ['name'] - -class RecipeIngredientNode(DjangoObjectType): - - class Meta: - model = RecipeIngredient - # Allow for some more advanced filtering here - interfaces = (Node, ) - filter_fields = { - 'name': ['exact', 'icontains', 'istartswith'], - 'notes': ['exact', 'icontains'], - 'recipe': ['exact'], - 'recipe__name': ['icontains'], - } - filter_order_by = ['name', 'recipe__name',] - -class Query(AbstractType): - recipe = Node.Field(RecipeNode) - all_categories = DjangoFilterConnectionField(RecipeNode) - - recipeingredient = Node.Field(IngredientNode) - all_recipeingredients = DjangoFilterConnectionField(RecipeIngredientNode)