File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change 88
99from . import models
1010from . import nodes
11+ from . import types
1112from .setup import fixtures , fixtures_dirname
1213from ..fields import MongoengineConnectionField
1314
@@ -249,7 +250,7 @@ class Query(graphene.ObjectType):
249250 assert result .data == expected
250251
251252
252- """
253+
253254def test_should_query_editors_with_dataloader (fixtures ):
254255 from promise import Promise
255256 from promise .dataloader import DataLoader
@@ -272,29 +273,41 @@ class Query(graphene.ObjectType):
272273 # editors = MongoengineConnectionField(nodes.EditorNode)
273274 editors = graphene .List (types .EditorType )
274275
275- def resolve_editors(self, info, **args):
276- print(self.__dict__)
276+ def resolve_editors (self , info , * args , ** kwargs ):
277+ print ('hell' )
278+ # print(self.__dict__)
279+ print (self )
280+ print (info )
281+ print (args )
282+ print (kwargs )
277283 return None
278284
279285
280286 query = '''
281287 query EditorPromiseQuery {
282288 editors(first: 1) {
289+ firstName
290+ }
291+ }
292+ '''
293+ """
294+ query = '''
295+ query EditorPromiseQuery {
296+ editors {
283297 edges {
284298 node {
285- id,
286- firstName,
287- lastName
299+ firstName
288300 }
289301 }
290302 }
291303 }
292304 '''
293-
305+ """
294306 schema = graphene .Schema (query = Query )
295307 result = schema .execute (query )
296- print(result.data)
297- """
308+ assert not result .errors
309+ # print(result.errors)
310+ print ('ccccc' * 10 , result .data )
298311
299312
300313def test_should_filter_editors_by_id (fixtures ):
You can’t perform that action at this time.
0 commit comments