graphql-python / graphql-python/graphene-sqlalchemy

String ID

Aberta
#247 2 comentários 0 reações 1 responsável Reivindicada por @erikwrede Ver no GitHub
enhancement
Linguagem predominante
Python
Estrelas
985
Forks
223
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

```

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.