From 6ab767fe673fccfa1dd8563eadc2f97c6bde5413 Mon Sep 17 00:00:00 2001 From: Dan Palmer Date: Sat, 8 Sep 2018 18:19:18 +0100 Subject: [PATCH] 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. --- graphene/relay/mutation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphene/relay/mutation.py b/graphene/relay/mutation.py index ee758e78..d9fa5c22 100644 --- a/graphene/relay/mutation.py +++ b/graphene/relay/mutation.py @@ -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 = {}