File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ def list_resolver(
5858
5959 return queryset
6060
61- def get_resolver (self , parent_resolver ):
61+ def wrap_resolve (self , parent_resolver ):
6262 _type = self .type
6363 if isinstance (_type , NonNull ):
6464 _type = _type .of_type
@@ -217,7 +217,7 @@ def connection_resolver(
217217
218218 return on_resolve (iterable )
219219
220- def get_resolver (self , parent_resolver ):
220+ def wrap_resolve (self , parent_resolver ):
221221 return partial (
222222 self .connection_resolver ,
223223 parent_resolver ,
Original file line number Diff line number Diff line change @@ -417,12 +417,14 @@ class ReporterFilterNode(DjangoObjectType):
417417 class Meta :
418418 model = Reporter
419419 interfaces = (Node ,)
420+ fields = "__all__"
420421 filter_fields = ["first_name" , "articles" ]
421422
422423 class ArticleFilterNode (DjangoObjectType ):
423424 class Meta :
424425 model = Article
425426 interfaces = (Node ,)
427+ fields = "__all__"
426428 filter_fields = ["headline" , "reporter" ]
427429
428430 class Query (ObjectType ):
@@ -472,12 +474,14 @@ class ReporterFilterNode(DjangoObjectType):
472474 class Meta :
473475 model = Reporter
474476 interfaces = (Node ,)
477+ fields = "__all__"
475478 filter_fields = ["first_name" , "articles" ]
476479
477480 class ArticleFilterNode (DjangoObjectType ):
478481 class Meta :
479482 model = Article
480483 interfaces = (Node ,)
484+ fields = "__all__"
481485 filter_fields = ["headline" , "reporter" ]
482486
483487 class Query (ObjectType ):
Original file line number Diff line number Diff line change @@ -1122,6 +1122,7 @@ class ReporterType(DjangoObjectType):
11221122 class Meta :
11231123 model = Reporter
11241124 interfaces = (Node ,)
1125+ fields = "__all__"
11251126
11261127 class Query (graphene .ObjectType ):
11271128 all_reporters = DjangoConnectionField (ReporterType )
@@ -1166,6 +1167,7 @@ class ReporterType(DjangoObjectType):
11661167 class Meta :
11671168 model = Reporter
11681169 interfaces = (Node ,)
1170+ fields = "__all__"
11691171
11701172 class Query (graphene .ObjectType ):
11711173 all_reporters = DjangoConnectionField (ReporterType )
@@ -1198,6 +1200,7 @@ class ReporterType(DjangoObjectType):
11981200 class Meta :
11991201 model = Reporter
12001202 interfaces = (Node ,)
1203+ fields = "__all__"
12011204
12021205 class Query (graphene .ObjectType ):
12031206 all_reporters = DjangoConnectionField (ReporterType )
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def test_camelize():
3939
4040@pytest .mark .django_db
4141@patch ("graphene_django.utils.testing.Client.post" )
42- def test_graphql_test_case_op_name (post_mock ):
42+ def test_graphql_test_case_operation_name (post_mock ):
4343 """
4444 Test that `GraphQLTestCase.query()`'s `operation_name` argument produces an `operationName` field.
4545 """
@@ -63,8 +63,8 @@ def runTest(self):
6363
6464@pytest .mark .django_db
6565@patch ("graphene_django.utils.testing.Client.post" )
66- def test_graphql_query_case_op_name (post_mock ):
67- graphql_query ("query { }" , op_name = "QueryName" )
66+ def test_graphql_query_case_operation_name (post_mock ):
67+ graphql_query ("query { }" , operation_name = "QueryName" )
6868 body = json .loads (post_mock .call_args .args [1 ])
6969 # `operationName` field from https://graphql.org/learn/serving-over-http/#post-request
7070 assert (
Original file line number Diff line number Diff line change 5858 keywords = "api graphql protocol rest relay graphene" ,
5959 packages = find_packages (exclude = ["tests" ]),
6060 install_requires = [
61- "graphene>=3.0.0b1 ,<4" ,
61+ "graphene>=3.0.0b5 ,<4" ,
6262 "graphql-core>=3.1.0,<4" ,
6363 "Django>=2.2" ,
6464 "promise>=2.1" ,
You can’t perform that action at this time.
0 commit comments