graphene
graphene copied to clipboard
why use different behavior for the description of query and mutation
-
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 thedescription
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
.