Skip to content

Commit cb974e9

Browse files
authored
Merge pull request #21 from palmkevin/BigInteger
sqlalchemy-type Biginteger cannot be handled as graphql-type integer because it is limited to 32 bit
2 parents 8080232 + f83e406 commit cb974e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graphene_sqlalchemy/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def convert_column_to_datetime(type, column, registry=None):
102102

103103

104104
@convert_sqlalchemy_type.register(types.SmallInteger)
105-
@convert_sqlalchemy_type.register(types.BigInteger)
106105
@convert_sqlalchemy_type.register(types.Integer)
107106
def convert_column_to_int_or_id(type, column, registry=None):
108107
if column.primary_key:
@@ -118,6 +117,7 @@ def convert_column_to_boolean(type, column, registry=None):
118117

119118
@convert_sqlalchemy_type.register(types.Float)
120119
@convert_sqlalchemy_type.register(types.Numeric)
120+
@convert_sqlalchemy_type.register(types.BigInteger)
121121
def convert_column_to_float(type, column, registry=None):
122122
return Float(description=column.doc, required=not(column.nullable))
123123

graphene_sqlalchemy/tests/test_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_should_small_integer_convert_int():
8585

8686

8787
def test_should_big_integer_convert_int():
88-
assert_column_conversion(types.BigInteger(), graphene.Int)
88+
assert_column_conversion(types.BigInteger(), graphene.Float)
8989

9090

9191
def test_should_integer_convert_int():

0 commit comments

Comments
 (0)