mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-02 20:54:16 +03:00
Improved mutation class
This commit is contained in:
parent
858343a8f6
commit
3604c8f172
|
@ -41,8 +41,10 @@ class Mutation(ObjectType):
|
||||||
else:
|
else:
|
||||||
arguments = {}
|
arguments = {}
|
||||||
|
|
||||||
resolver = resolver or get_unbound_function(getattr(cls, 'mutate', None))
|
if not resolver:
|
||||||
assert resolver, 'All mutations must define a mutate method in it'
|
mutate = getattr(cls, 'mutate', None)
|
||||||
|
assert mutate, 'All mutations must define a mutate method in it'
|
||||||
|
resolver = get_unbound_function(mutate)
|
||||||
|
|
||||||
_meta.fields = fields
|
_meta.fields = fields
|
||||||
_meta.output = output
|
_meta.output = output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user