Skip to content

JSONString type in schema instead of int #159

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

Closed
comtihon opened this issue Aug 23, 2018 · 2 comments
Closed

JSONString type in schema instead of int #159

comtihon opened this issue Aug 23, 2018 · 2 comments

Comments

@comtihon
Copy link

comtihon commented Aug 23, 2018

Hi,
I have this id in my object:
my_id = Column(BigInteger().with_variant(sqlite.INTEGER(), 'sqlite'), primary_key=True)
But in graphql schema I see JSONString type instead of Int.
I use flask-sqlalchemy, graphene-sqlalchemy and flask-graphene.

Solution for now is to add my_id = graphene.Int() everywhere at SQLAlchemyObjectType subclasses. But I don't like it as I have to remember it.

Whitout .with_variant(sqlite.INTEGER(), 'sqlite') id type in schema becames Float which is also not correct.

@erikwrede
Copy link
Member

I can not reproduce this with graphene-sqlalchemy==3.0.0b1. If this is still relevant, please open a new issue including a minimal example (SQLAlchemy Model + Graphene-SQLAlchemy types.)
However, I can reproduce that BigInteger is converted to the graphene.Float scalar instead of the Integer scalar. I have added this to the notes in #345.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants