BadRequestError: Missing multipart field ‘operations’
See original GitHub issueHello there,
I’ve been struggling to get apollo-upload-server working in my local environment, along side apollo-upload-client inside my vue.js app. I’ve had graphql using express working no problem and only have this issue when I added apollo-upload-server/client. I can run non-file mutations and they go through fine. But with a file mutation, I continually get the error BadRequestError: Missing multipart field ‘operations’
.
I believe the error is happening on the server. I’ve narrowed down to just running:
import express from 'express'
import graphqlHTTP from 'express-graphql'
import { apolloUploadExpress } from 'apollo-upload-server'
import schema from './schema'
express()
.use(
'/graphql',
apolloUploadExpress({ maxFileSize: 10000000, maxFiles: 10 }),
graphqlHTTP({ schema })
)
.listen(3000)
And I still get the error, even when using curl. One thing I did notice was that in my vue app, on the first request there was an empty body for where the file contents were supposed to go. But again, in theory, curl failing means it is still the server and not the client.
Any help would be greatly appreciated!
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
I solve it, by adding
uploads: false
:const server = new ApolloServer({ uploads:false, schema, playground: true });
@intellix did it work?