Skip to content

Commit 7460bc2

Browse files
committed
wip
1 parent d14a732 commit 7460bc2

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

graphene_mongo/tests/test_relay_query.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from . import models
1010
from . import nodes
11+
from . import types
1112
from .setup import fixtures, fixtures_dirname
1213
from ..fields import MongoengineConnectionField
1314

@@ -249,7 +250,7 @@ class Query(graphene.ObjectType):
249250
assert result.data == expected
250251

251252

252-
"""
253+
253254
def 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

300313
def test_should_filter_editors_by_id(fixtures):

0 commit comments

Comments
 (0)