graphql-python / graphql-python/graphene-sqlalchemy

String ID

Abierto
#247 2 comentarios 0 reacciones 1 asignado Reclamado por @erikwrede Ver en GitHub
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

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.