We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d66f1d0 commit 778fbd7Copy full SHA for 778fbd7
graphene_sqlalchemy/converter.py
@@ -8,7 +8,7 @@
8
from sqlalchemy import types as sqa_types
9
from sqlalchemy.dialects import postgresql
10
from sqlalchemy.ext.hybrid import hybrid_property
11
-from sqlalchemy.orm import MapperProperty, interfaces, strategies
+from sqlalchemy.orm import interfaces, strategies
12
13
import graphene
14
from graphene.types.json import JSONString
@@ -27,6 +27,13 @@
27
value_equals_strict,
28
)
29
30
+# We just use MapperProperties for type hints, they don't exist in sqlalchemy < 1.4
31
+try:
32
+ from sqlalchemy import MapperProperty
33
+except ImportError:
34
+ # sqlalchemy < 1.4
35
+ MapperProperty = Any
36
+
37
try:
38
from typing import ForwardRef
39
except ImportError:
0 commit comments