Skip to content

sqlalchemy-type Biginteger cannot be handled as graphql-type integer because it is limited to 32 bit #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion graphene_sqlalchemy/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ 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.Integer)
def convert_column_to_int_or_id(type, column, registry=None):
if column.primary_key:
Expand All @@ -111,6 +110,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))

Expand Down
2 changes: 1 addition & 1 deletion graphene_sqlalchemy/tests/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_should_small_integer_convert_int():


def test_should_big_integer_convert_int():
assert_column_conversion(types.BigInteger(), graphene.Int)
assert_column_conversion(types.BigInteger(), graphene.Float)


def test_should_integer_convert_int():
Expand Down