Skip to content

Commit

Permalink
Document new syntax for file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Sep 18, 2024
1 parent 04fdd28 commit 6733188
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion website/src/pages/docs/data/network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ You also have to define `extractFiles` function:

```ts
import extractFiles from 'extract-files/extractFiles.mjs';
import isExtractableFile from 'extract-files/isExtractableFile.mjs';

// the import depends on the version of `extract-files`

Expand All @@ -170,7 +171,7 @@ import extractFiles from 'extract-files/extractFiles.mjs';
return {
link: httpLink.create({
uri: '/graphql',
extractFiles, // <-
extractFiles: body => extractFiles(body, isExtractableFile), // <-
}),
cache: new InMemoryCache(),
};
Expand Down

0 comments on commit 6733188

Please sign in to comment.