graphql-python / graphql-python/graphene
why use different behavior for the description of query and mutation
- Vorherrschende Sprache
- Python
- Sterne
- 8.2k
- Forks
- 818
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
* **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`.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.