Skip to content
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

String ID #247

Open
adrianschneider94 opened this issue Sep 8, 2019 · 2 comments
Open

String ID #247

adrianschneider94 opened this issue Sep 8, 2019 · 2 comments
Assignees

Comments

@adrianschneider94
Copy link

Not only ints should be converted to the ID type, but also strings. Especially as GraphQL itself considers IDs as strings.

@convert_sqlalchemy_type.register(types.String)
@convert_sqlalchemy_type.register(types.SmallInteger)
@convert_sqlalchemy_type.register(types.Integer)
def convert_column_to_int_or_id(type, column, registry=None):
    return ID if column.primary_key else String
@jnak
Copy link
Collaborator

jnak commented Sep 24, 2019

I agree with this. I'm happy to revisit this when tacking #102. Feel free to share your opinion in the other thread if you want to help move this forward. Cheers

@erikwrede erikwrede self-assigned this Jun 28, 2022
@erikwrede
Copy link
Member

Will try this out while testing graphene#1428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants