-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into release-3.7.
- Loading branch information
Showing
12 changed files
with
550 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: File uploads | ||
description: 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: [https://github.com/jaydenseric/apollo-upload-client](https://github.com/jaydenseric/apollo-upload-client). | ||
|
||
An example configuration is show below using the [apollo-upload-client](https://github.com/jaydenseric/apollo-upload-client) package. | ||
|
||
```bash | ||
npm install apollo-upload-client | ||
``` | ||
|
||
Basic setup for the Apollo Client: | ||
|
||
```js | ||
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() | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.