File uploads in Node.js < v8.5.0
File uploads are supported in Apollo Server 2.x through the third-party graphql-upload
graphql-upload
project no longer supports file uploads on versions of Node.js prior to v8.5.0 due to changes in the underlying architecture.
While Node.js versions prior to v8.5.0 are still under
For example, while Node.js 6.x is covered by Long Term Support until April 2019, there are substantial performance (e.g.
Since file upload support for Node.js versions prior to v8.5.0 is no longer offered by graphql-upload
, users of those versions must disable file uploads to continue using newer Apollo Server 2.x versions.
To disable file uploads and continue using Apollo Server 2.x on Node.js 6.x, add the uploads: false
setting to the options when constructing the server. For example:
const { typeDefs, resolvers } = require('./anOutsideDependency');const server = new ApolloServer({/* Existing Apollo Server settings — e.g. type definitions */typeDefs,resolvers,/* Add this line to disable upload support! */uploads: false,/* ... other Apollo Server settings ... */})
For additional assistance, please