Skip to content

Commit 2f1bb7f

Browse files
committed
upd (converter): add sqlalchemy.types.JSON handling
1 parent 421f8e4 commit 2f1bb7f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

graphene_sqlalchemy/converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,6 @@ def convert_json_to_string(type, column, registry=None):
249249

250250

251251
@convert_sqlalchemy_type.register(JSONType)
252+
@convert_sqlalchemy_type.register(types.JSON)
252253
def convert_json_type_to_string(type, column, registry=None):
253254
return JSONString

graphene_sqlalchemy/tests/test_converter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ def test_should_scalar_list_convert_list():
188188

189189
def test_should_jsontype_convert_jsonstring():
190190
assert get_field(JSONType()).type == JSONString
191+
assert get_field(types.JSON()).type == JSONString
191192

192193

193194
def test_should_manytomany_convert_connectionorlist():

0 commit comments

Comments
 (0)