From aa8dc54d21f076c9e07d4e86c99958f1d22e5f78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20L=C3=B3pez=20Mart=C3=ADn?= Date: Mon, 9 Oct 2017 16:35:31 +0200 Subject: [PATCH] Pass context to serializer so authentication works --- graphene_django/rest_framework/mutation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/rest_framework/mutation.py b/graphene_django/rest_framework/mutation.py index 94d1e4b..33a994c 100644 --- a/graphene_django/rest_framework/mutation.py +++ b/graphene_django/rest_framework/mutation.py @@ -69,7 +69,7 @@ class SerializerMutation(ClientIDMutation): @classmethod def mutate_and_get_payload(cls, root, info, **input): - serializer = cls._meta.serializer_class(data=input) + serializer = cls._meta.serializer_class(data=input, context=info.context) if serializer.is_valid(): return cls.perform_mutate(serializer, info)