From 98c2af3fcc563fbdad75f15a04e69c38b9e61045 Mon Sep 17 00:00:00 2001 From: Vincent Poulailleau Date: Mon, 30 Oct 2017 16:00:18 +0100 Subject: [PATCH] fix access to the request in Django MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the current documentation, I get after execution: "graphql.error.located_error.GraphQLLocatedError: name 'context' is not defined" I don't get any error after the correction I made (I haven't yet tried to upload a fileā€¦) --- docs/relay/mutations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/relay/mutations.rst b/docs/relay/mutations.rst index 89bf89b3..d273c137 100644 --- a/docs/relay/mutations.rst +++ b/docs/relay/mutations.rst @@ -48,7 +48,7 @@ Mutations can also accept files, that's how it will work with different integrat @classmethod def mutate_and_get_payload(cls, root, info, **input): # When using it in Django, context will be the request - files = context.FILES + files = info.context.FILES # Or, if used in Flask, context will be the flask global request # files = context.files