Skip to content

Commit

Permalink
Add geoalchemy2 Geometry Column support
Browse files Browse the repository at this point in the history
  • Loading branch information
ianepperson committed Aug 15, 2020
1 parent 4b7ceed commit 0b6007f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions graphene_sqlalchemy/converter.py
Expand Up @@ -27,6 +27,11 @@ def __getattr__(self, name):
except ImportError:
sqlalchemy_utils = DummyImport()

try:
from geoalchemy2.elements import WKBElement
except ImportError:
WKBElement = object


is_selectin_available = getattr(strategies, 'SelectInLoader', None)

Expand Down Expand Up @@ -194,6 +199,7 @@ def convert_sqlalchemy_type(type, column, registry=None):
@convert_sqlalchemy_type.register(sqlalchemy_utils.EmailType)
@convert_sqlalchemy_type.register(sqlalchemy_utils.URLType)
@convert_sqlalchemy_type.register(sqlalchemy_utils.IPAddressType)
@convert_sqlalchemy_type.register(WKBElement)
def convert_column_to_string(type, column, registry=None):
return String

Expand Down

0 comments on commit 0b6007f

Please sign in to comment.