graphene icon indicating copy to clipboard operation
graphene copied to clipboard

why use different behavior for the description of query and mutation

Open Rainshaw opened this issue 3 years ago • 0 comments

  • 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.

Rainshaw avatar Apr 16 '21 06:04 Rainshaw