graphql-python / graphql-python/graphene-sqlalchemy
String ID
Abierto
enhancement
- Lenguaje dominante
- Python
- Estrellas
- 985
- Forks
- 223
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Not only ints should be converted to the ID type, but also strings. Especially as GraphQL itself considers IDs as strings.
```python
@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
```
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.