Updated answer from apollos example
https://www.apollographql.com/docs/react/data/file-uploads
import UploadHttpLink from "apollo-upload-client/UploadHttpLink.mjs";
import {ApolloProvider} from "@apollo/client/react";
const client = new ApolloClient({
link: new UploadHttpLink({
uri: 'http://localhost:8080/query',
}),
cache: new InMemoryCache(),
})