graphql-python / graphql-python/graphene

`graphql_schema` introspection doesn't output docstrings descriptions

Abierto
#1,492 0 comentarios 0 reacciones 0 asignados Ver en GitHub
🐛 bug
Lenguaje dominante
Python
Estrellas
8.2k
Forks
818
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**Note: for support questions, please use stackoverflow**. This repository's issues are reserved for feature requests and bug reports.

* **What is the current behavior?**

Running `manage graphql_schema` to export the `schema.graphql` doesn't output the description for types and fields. I've only tested it when the description is described via docstrings, e.g.:

```
class SomeType(graphene.ObjectType):
"""
Some description
"""

field = graphene.String()
```

but I suspect it also doesn't work when using `description=` or the `Meta` class as described here:

Screenshot 2023-01-12 at 11 37 23

* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem** via
a github repo, https://repl.it or similar.

- Create a schema with at least one type with a description (and/or a field description)
- Run the `graphql_schema` introspection command to export a `schema.graphql` file

* **What is the expected behavior?**

The schema is outputted including field and type descriptions.

* **What is the motivation / use case for changing the behavior?**

No type or field descriptions are exported.

* **Please tell us about your environment:**

- Version: ^2.13.0
- Platform:

* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce el problema definiendo un tipo y un campo de Graphene con descripciones en el docstring; después, ejecuta el comando `manage graphql_schema` para exportar `schema.graphql`. Compara el esquema exportado con las descripciones esperadas del tipo y del campo; se considera completado cuando ambas descripciones están incluidas en la salida, y también se ha comprobado el comportamiento de `description=` y `Meta` si corresponde.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
graphql, python
Área
api
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.