title: How should a GraphQL request for file upload look like?
body: <p>I use <a href="https://github.com/graphql-python/graphene/issues/853" rel="nofollow noreferrer">Graphene</a> on the server side with similar code to the one from <a href="https://github.com/graphql-python/graphene/blob/1b746e64609e4bc9d9baf880954415452b476812/docs/relay/mutations.rst" rel="nofollow noreferrer">documentation</a>:</p>
  
  <pre><code>class UploadFile(graphene.ClientIDMutation):
       class Input:
           pass
           # nothing needed for uploading file
  
       # your return fields
       success = graphene.String()
  
      @classmethod
      def mutate_and_get_payload(cls, root, info, **input):
          # When using it in Django, context will be the request
          files = info.context.FILES
          # Or, if used in Flask, context will be the flask global request
          # files = context.files
  
          # do something with files
  
          return UploadFile(success=True)
  </code></pre>
  
  <p>It's all clear, but how should the request look like ?</p>
  
  <p>I've seen people suggesting multipart/form-data, but AFAIK that requires additional layer to parse the multipart request, so that's probably not what I need.. or is it ? :</p>
  
  <pre><code>curl -X "POST" "http://127.0.0.1:5001/graphql" \
       -H 'Content-Type: multipart/form-data; boundary=----GraphQLFileUpload' \
       -F "operations={\"query\":\"mutation ($files: [Upload!]!) {uploadFile(selfie: $file) {status}}\",\"variables\":{}}" \
       -F "map={\"x\":[\"variables.files.x\"]}" \
       -F "x=@/tmp/dummy.jpg "
  </code></pre>