title: Graphql upload getting "Invalid JSON in the ‘operations’ multipart field"
body: <p>I been struggling to figure out how to get file upload working in graphql.</p>
  <p>Here is basic implementation i have.</p>
  <pre><code>
  // eslint-disable-next-line import/no-extraneous-dependencies
  const { ApolloServer, gql }             = require('apollo-server-express')
  // eslint-disable-next-line import/no-extraneous-dependencies
  const express                      = require('express')
  
  
  const typeDefs = gql`  
    type File {
      filename: String!
      mimetype: String!
      encoding: String!
    }
    
    type Query {
      _ : Boolean
    }
    
    type Mutation {
      singleUpload(file: Upload!): File!,
      singleUploadStream(file: Upload!): File!
    }
  `;
  
  const resolvers = {
    Mutation: {
      singleUpload: (parent, args) =&gt; {
        return args.file.then(file =&gt; {
          const {createReadStream, filename, mimetype} = file
  
          const fileStream = createReadStream()
  
          return file;
        });
      },
      singleUploadStream: async (parent, args) =&gt; {
        const file = await args.file
        const {createReadStream, filename, mimetype} = file
        const fileStream = createReadStream()
  
        const uploadParams = {Bucket: 'apollo-file-upload-test', Key: filename, Body: fileStream};
  
        console.log(result)
  
  
        return file;
      }
    },
  };
  
  
  const server = new ApolloServer({ typeDefs, resolvers });
  
  const app = express()
  server.applyMiddleware({ app })
  
  const port = Number(process.env.API_PORT || 4000)
  
  app.listen({ port }, () =&gt; {
      // eslint-disable-next-line no-console
      console.debug(` Server ready at http://localhost:${port}${server.graphqlPath}`)
  })
  </code></pre>
  <p>i am follow the doc for graphql-upload library.
  <a href="https://github.com/jaydenseric/graphql-multipart-request-spec" rel="nofollow noreferrer">https://github.com/jaydenseric/graphql-multipart-request-spec</a></p>
  <p>This is the command i'm using to upalod:</p>
  <pre><code>curl http://localhost:4000/graphql -F operations='{ &quot;query&quot;: &quot;mutation ($file: Upload!) { singleUploadStream
  (file: $file) { filename } }”, &quot;variables&quot;: { &quot;file&quot;: null } }' -F map='{ &quot;0&quot;: [&quot;variables.file&quot;] }' -F 0=@/Users/XXX/Downloads/image.jpg
  </code></pre>