Join us for GraphQL Summit, October 10-12 in San Diego. Super Early Bird registration ends soon!
Try Apollo Studio

File uploads

Enabling file uploads in Apollo Client

Apollo Client doesn't support a file upload feature out of the box. If you'd like to enable file upload capabilities, you will have to set Apollo Client up manually with a 3rd party package.

Detailed instructions on how to setup Apollo Client for file upload can be found here:

An example configuration is show below using the apollo-upload-client package.

npm install apollo-upload-client

Basic setup for the Apollo Client:

const { ApolloClient } = require('apollo-client')
const { InMemoryCache } = require('apollo-cache-inmemory')
const { createUploadLink } = require('apollo-upload-client')
const client = new ApolloClient({
cache: new InMemoryCache(),
link: createUploadLink()
Edit on GitHub