fs / fs/python-base-graphql-api
DjangoObjectType fields description
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Нужно добавить парсер параметра verbose_name Field-ов из модели ORM Django в description Field DjangoObjectType-a.
Чтобы это выглядело примерно так:
```python
class User(AbstractUser):
"""Custom user model."""
email = models.EmailField(verbose_name='Email address', unique=True)
avatar = models.ImageField(verbose_name='Avatar image', null=True, blank=True, storage=S3AvatarStorage())
username = models.CharField(verbose_name='Username', max_length=150, unique=True, null=True, blank=True)
class UserType(DjangoObjectType):
"""GraphQL type based on user model."""
avatar = graphene.String(name='avatarUrl')
username = graphene.String(description='Login for authentication') # В случае если хотим кастомизировать описание для поля
class Meta:
model = User
get_description_from_model = True
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.