Debian Codegraph @

examples/cookbook-plain/cookbook/recipes/schema.py

raw symbols SCIP
1 import graphenescip-python python graphene 3.4.3 graphene/__init__:
2 from graphene_django.typesscip-python python graphene-django 3.2.3 `graphene_django.types`/__init__: import DjangoObjectTypescip-python python graphene-django 3.2.3 `graphene_django.types`/DjangoObjectType#
3
4 from .modelsscip-python python graphene-django 3.2.3 models/__init__: import Recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/Recipe#, RecipeIngredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/RecipeIngredient#
5
6
7 class RecipeTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#(DjangoObjectTypescip-python python graphene-django 3.2.3 `graphene_django.types`/DjangoObjectType#):
8 class Metascip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#Meta#:
9 modelscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#Meta#model. = Recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/Recipe#
10 fieldsscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#Meta#fields. = "__all__"
11
12
13 class RecipeIngredientTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#(DjangoObjectTypescip-python python graphene-django 3.2.3 `graphene_django.types`/DjangoObjectType#):
14 class Metascip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#Meta#:
15 modelscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#Meta#model. = RecipeIngredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/RecipeIngredient#
16 fieldsscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#Meta#fields. = "__all__"
17
18
19 class Queryscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#:
20 recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#recipe. = graphenescip-python python graphene 3.4.3 graphene/__init__:.Fieldscip-python python graphene-django 3.2.3 `graphene.types.field`/Field#(RecipeTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#, id=graphenescip-python python graphene 3.4.3 graphene/__init__:.Intscip-python python graphene-django 3.2.3 `graphene.types.scalars`/Int#(), title=graphenescip-python python graphene 3.4.3 graphene/__init__:.Stringscip-python python graphene-django 3.2.3 `graphene.types.scalars`/String#())
21 all_recipesscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#all_recipes. = graphenescip-python python graphene 3.4.3 graphene/__init__:.Listscip-python python graphene-django 3.2.3 `graphene.types.structures`/List#(RecipeTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeType#)
22
23 recipeingredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#recipeingredient. = graphenescip-python python graphene 3.4.3 graphene/__init__:.Fieldscip-python python graphene-django 3.2.3 `graphene.types.field`/Field#(RecipeIngredientTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#, id=graphenescip-python python graphene 3.4.3 graphene/__init__:.Intscip-python python graphene-django 3.2.3 `graphene.types.scalars`/Int#())
24 all_recipeingredientsscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#all_recipeingredients. = graphenescip-python python graphene 3.4.3 graphene/__init__:.Listscip-python python graphene-django 3.2.3 `graphene.types.structures`/List#(RecipeIngredientTypescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/RecipeIngredientType#)
25
26 def resolve_recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(selfscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(self), contextscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(context), idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(id)=None, titlescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(title)=None):
27 if idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(id) is not None:
28 return Recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/Recipe#.objects.get(pk=idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(id))
29
30 if titlescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(title) is not None:
31 return Recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/Recipe#.objects.get(title=titlescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipe().(title))
32
33 return None
34
35 def resolve_recipeingredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(selfscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(self), contextscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(context), idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(id)=None):
36 if idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(id) is not None:
37 return RecipeIngredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/RecipeIngredient#.objects.get(pk=idscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_recipeingredient().(id))
38
39 return None
40
41 def resolve_all_recipesscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipes().(selfscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipes().(self), contextscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipes().(context)):
42 return Recipescip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/Recipe#.objects.all()
43
44 def resolve_all_recipeingredientsscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipeingredients().(selfscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipeingredients().(self), contextscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.schema`/Query#resolve_all_recipeingredients().(context)):
45 related = ["recipe", "ingredient"]
46 return RecipeIngredientscip-python python graphene-django 3.2.3 `examples.cookbook-plain.cookbook.recipes.models`/RecipeIngredient#.objects.select_related(*related).all()