Skip to content

Commit 98c2af3

Browse files
authored
fix access to the request in Django
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…)
1 parent 36a902f commit 98c2af3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/relay/mutations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Mutations can also accept files, that's how it will work with different integrat
4848
@classmethod
4949
def mutate_and_get_payload(cls, root, info, **input):
5050
# When using it in Django, context will be the request
51-
files = context.FILES
51+
files = info.context.FILES
5252
# Or, if used in Flask, context will be the flask global request
5353
# files = context.files
5454

0 commit comments

Comments
 (0)