Skip to content

Commit 8f373cc

Browse files
authored
Update mutations.rst
1 parent eb1ded2 commit 8f373cc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/relay/mutations.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ subclass of ``relay.ClientIDMutation``.
3131
3232
3333
Accepting Files
34-
-------------
34+
---------------
3535

36-
Mutations can also accept files, they will be in the context variable.
36+
Mutations can also accept files, that's how it will work with different integrations:
3737

3838
.. code:: python
3939
@@ -47,8 +47,10 @@ Mutations can also accept files, they will be in the context variable.
4747
4848
@classmethod
4949
def mutate_and_get_payload(cls, input, context, info):
50+
# When using it in Django, context will be the request
5051
files = context.FILES
51-
print(files)
52+
# Or, if used in Flask, context will be the flask global request
53+
# files = context.files
5254
5355
# do something with files
5456

0 commit comments

Comments
 (0)