mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +03:00
Enabled possibility of setting name, description or deprecation_reason in mutation Fields
Fixed #634, $660 #626 and #593
This commit is contained in:
parent
da0b2c6805
commit
a7a4ba62af
|
@ -76,7 +76,12 @@ class Mutation(ObjectType):
|
||||||
super(Mutation, cls).__init_subclass_with_meta__(_meta=_meta, **options)
|
super(Mutation, cls).__init_subclass_with_meta__(_meta=_meta, **options)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def Field(cls, *args, **kwargs):
|
def Field(cls, name=None, description=None, deprecation_reason=None):
|
||||||
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,
|
||||||
|
name=name,
|
||||||
|
description=description,
|
||||||
|
deprecation_reason=deprecation_reason,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user