From 8f373ccec397995c2a98912ecf0eace138c4f107 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Mon, 6 Feb 2017 19:48:09 -0800 Subject: [PATCH] Update mutations.rst --- docs/relay/mutations.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/relay/mutations.rst b/docs/relay/mutations.rst index 48185e3f..507d4a09 100644 --- a/docs/relay/mutations.rst +++ b/docs/relay/mutations.rst @@ -31,9 +31,9 @@ subclass of ``relay.ClientIDMutation``. Accepting Files -------------- +--------------- -Mutations can also accept files, they will be in the context variable. +Mutations can also accept files, that's how it will work with different integrations: .. code:: python @@ -47,8 +47,10 @@ Mutations can also accept files, they will be in the context variable. @classmethod def mutate_and_get_payload(cls, input, context, info): + # When using it in Django, context will be the request files = context.FILES - print(files) + # Or, if used in Flask, context will be the flask global request + # files = context.files # do something with files