Docs
Launch GraphOS Studio

File uploads

Enabling file uploads in 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: https://github.com/jaydenseric/apollo-upload-client.

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()
})
Next
Introduction
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company