Allow user to specify mutation description

At the moment user is unable to specify mutation description. 
Mutation class documentation (`__doc__`) is assigned to mutation payload type instead of the mutation itself.

We can change this behaviour so mutation class documentation will be automatically reflected in GraphQL schema (type description).
This commit is contained in:
Lukasz 2017-12-05 17:59:48 +09:00 committed by GitHub
parent 6c92e25ae8
commit 35229378ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,5 +77,5 @@ class Mutation(ObjectType):
@classmethod @classmethod
def Field(cls, *args, **kwargs): def Field(cls, *args, **kwargs):
return Field( return Field(
cls._meta.output, args=cls._meta.arguments, resolver=cls._meta.resolver cls._meta.output, args=cls._meta.arguments, resolver=cls._meta.resolver, description=cls.__doc__
) )