Skip to content

String ID #247

Open
Open
@adrianschneider94

Description

@adrianschneider94

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions