graphql-python / graphql-python/graphene

why use different behavior for the description of query and mutation

Open
#1,325 0 comments 0 reactions 0 assignees View on GitHub
🐛 bug
Dominant language
Python
Stars
8.2k
Forks
818
PR merge metrics
No merged PRs in 30d

Description

* **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`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.