You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal of this commit is to be able to subclass mutations like this:
```
class BaseMutation(graphene.Mutation):
class Arguments:
name = graphene.String()
def mutate(self, info, **kwargs):
# do something
class ChildMutation(BaseMutation):
class Arguments(BaseMutation.Arguments):
other_arg = graphene.String()
def mutate(self, info, **kwargs):
# do other things
```
Note:
vars(x).get(key, gettattr(x, key)) is used instead of the
simpler gettatrr(x, key) for python2.7 compat.
Indeed python2 and python3 lead to different results for
class Foo(object):
def bar(self):
pass
getattr(Foo, 'bar')
# python 2.7 : > unbound method bar
# python 3.x : > function Foo.bar
0 commit comments