graphql-python / graphql-python/graphene

why use different behavior for the description of query and mutation

Aperta
#1,325 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
🐛 bug
Lingua principale
Python
Stelle
8.2k
Fork
818
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

* **What is the current behavior?**
Now, the query description only use the `description=...` args for docs, the description or the __doc__ in Typeclass only use for Type docs.
but the mutation use the `description` args or the description of mutation class or the __doc__ of mutation class for both mutation docs and mutation class docs.

* **What is the expected behavior?**
Both query and mutation should share the same logic for docs, first use the `description` arg of the field, then the description of meta class of class, the last is using __doc__ of (the type or mutation) class.

* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
dig into code, I find the graphene.mutation has a classmethod func named Field which return graphene.Field with `description=description or cls._meta.description`.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.