From 8ba849b65fd9c9494644d768341ed9505b05c20f Mon Sep 17 00:00:00 2001 From: Palm Kevin Date: Fri, 28 Oct 2016 07:23:46 +0200 Subject: [PATCH] convert biginteger to float Biginteger can be too big for integer because integer is limited to 32 bit --- graphene_sqlalchemy/converter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphene_sqlalchemy/converter.py b/graphene_sqlalchemy/converter.py index 05690697..c37311bc 100644 --- a/graphene_sqlalchemy/converter.py +++ b/graphene_sqlalchemy/converter.py @@ -95,7 +95,7 @@ def convert_column_to_string(type, column, registry=None): @convert_sqlalchemy_type.register(types.SmallInteger) -@convert_sqlalchemy_type.register(types.BigInteger) +#@convert_sqlalchemy_type.register(types.BigInteger) @convert_sqlalchemy_type.register(types.Integer) def convert_column_to_int_or_id(type, column, registry=None): if column.primary_key: @@ -111,6 +111,7 @@ def convert_column_to_boolean(type, column, registry=None): @convert_sqlalchemy_type.register(types.Float) @convert_sqlalchemy_type.register(types.Numeric) +@convert_sqlalchemy_type.register(types.BigInteger) def convert_column_to_float(type, column, registry=None): return Float(description=column.doc, required=not(column.nullable))