Skip to content

Commit c6a0419

Browse files
committed
Add explicit fields = "__all__" in examples as it will be required soon
1 parent 094bd52 commit c6a0419

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
class CategoryType(DjangoObjectType):
88
class Meta:
99
model = Category
10+
fields = "__all__"
1011

1112

1213
class IngredientType(DjangoObjectType):
1314
class Meta:
1415
model = Ingredient
16+
fields = "__all__"
1517

1618

1719
class Query(object):

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
class RecipeType(DjangoObjectType):
88
class Meta:
99
model = Recipe
10+
fields = "__all__"
1011

1112

1213
class RecipeIngredientType(DjangoObjectType):
1314
class Meta:
1415
model = RecipeIngredient
16+
fields = "__all__"
1517

1618

1719
class Query(object):

examples/cookbook/cookbook/ingredients/schema.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class CategoryNode(DjangoObjectType):
1010
class Meta:
1111
model = Category
1212
interfaces = (Node,)
13+
fields = "__all__"
1314
filter_fields = ["name", "ingredients"]
1415

1516

@@ -18,6 +19,7 @@ class Meta:
1819
model = Ingredient
1920
# Allow for some more advanced filtering here
2021
interfaces = (Node,)
22+
fields = "__all__"
2123
filter_fields = {
2224
"name": ["exact", "icontains", "istartswith"],
2325
"notes": ["exact", "icontains"],

examples/cookbook/cookbook/recipes/schema.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class RecipeNode(DjangoObjectType):
88
class Meta:
99
model = Recipe
1010
interfaces = (Node,)
11+
fields = "__all__"
1112
filter_fields = ["title", "amounts"]
1213

1314

@@ -16,6 +17,7 @@ class Meta:
1617
model = RecipeIngredient
1718
# Allow for some more advanced filtering here
1819
interfaces = (Node,)
20+
fields = "__all__"
1921
filter_fields = {
2022
"ingredient__name": ["exact", "icontains", "istartswith"],
2123
"recipe": ["exact"],

examples/starwars/schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Ship(DjangoObjectType):
1212
class Meta:
1313
model = ShipModel
1414
interfaces = (relay.Node,)
15+
fields = "__all__"
1516

1617
@classmethod
1718
def get_node(cls, info, id):
@@ -22,12 +23,14 @@ def get_node(cls, info, id):
2223
class Character(DjangoObjectType):
2324
class Meta:
2425
model = CharacterModel
26+
fields = "__all__"
2527

2628

2729
class Faction(DjangoObjectType):
2830
class Meta:
2931
model = FactionModel
3032
interfaces = (relay.Node,)
33+
fields = "__all__"
3134

3235
@classmethod
3336
def get_node(cls, info, id):

0 commit comments

Comments
 (0)