Skip to content

Commit be10a58

Browse files
committed
feat: Support contains query of list of primitive type
1 parent 0043d00 commit be10a58

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

graphene_mongo/fields.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from graphene.relay import ConnectionField
99
from graphene.types.argument import to_arguments
1010
from graphene.types.dynamic import Dynamic
11-
from graphene.types.structures import Structure, List
11+
from graphene.types.structures import Structure
1212
from graphql_relay.connection.arrayconnection import connection_from_list_slice
1313

1414
from .advanced_types import PointFieldType, MultiPolygonFieldType
@@ -65,7 +65,6 @@ def args(self, args):
6565

6666
def _field_args(self, items):
6767
def is_filterable(k):
68-
print(k)
6968
if not hasattr(self.model, k):
7069
return False
7170
if isinstance(getattr(self.model, k), property):
@@ -82,7 +81,6 @@ def is_filterable(k):
8281
return True
8382

8483
def get_type(v):
85-
print(v)
8684
if isinstance(v.type, Structure):
8785
return v.type.of_type()
8886
return v.type()
@@ -130,7 +128,6 @@ def get_queryset(self, model, info, **args):
130128
return queryset_or_filters
131129
else:
132130
args.update(queryset_or_filters)
133-
print(args)
134131
return model.objects(**args)
135132

136133
def default_resolver(self, _root, info, **args):

graphene_mongo/tests/test_fields.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def test_reporter_field_args():
2121
field = MongoengineConnectionField(ReporterNode)
2222

2323
field_args = ['id', 'first_name', 'last_name', 'email', 'awards']
24-
print(field.field_args['awards'])
2524
assert set(field.field_args.keys()) == set(field_args)
2625

2726

graphene_mongo/tests/test_relay_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class Query(graphene.ObjectType):
346346

347347
query = '''
348348
query ReportersQuery {
349-
reporters (awards: "2010") {
349+
reporters (awards: "2010-mvp") {
350350
edges {
351351
node {
352352
id,

0 commit comments

Comments
 (0)