mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-27 08:19:45 +03:00
Fix inheritance ordering so that mixins work
This looks like it's intended to allow for mixins to mutation input types, however the ordering means that `InputObjectType` is the first in the inheritance tree, and it doesn't necessarily always call super, restricting customisation. This PR re-orders the inheritance so that we can override behaviour on `InputObjectType`. If I've missed a use-case for why it's this way around do let me know, but I can't think of one. This change was required in order to override the description of the payload type for the mutation.
This commit is contained in:
parent
e043527d5e
commit
6ab767fe67
|
@ -20,9 +20,9 @@ class ClientIDMutation(Mutation):
|
|||
assert not output, "Can't specify any output"
|
||||
assert not arguments, "Can't specify any arguments"
|
||||
|
||||
bases = (InputObjectType,)
|
||||
bases = (InputObjectType, )
|
||||
if input_class:
|
||||
bases += (input_class,)
|
||||
bases = (input_class, ) + bases
|
||||
|
||||
if not input_fields:
|
||||
input_fields = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user