Skip to content

Commit

Permalink
Add more info to the dosc
Browse files Browse the repository at this point in the history
  • Loading branch information
beerose committed Mar 20, 2023
1 parent 2e99784 commit 00d5746
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion website/src/pages/plugins/presets/preset-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ const nextConfig = {
Note that you will need to provide the `artifactDirectory` path that should be the same as the one configured in your `codegen.ts`
### DocumentMode
## DocumentMode
### Optimizing bundle size with a string DocumentMode
The `DocumentMode` option can be used to control how the plugin will generate the document nodes.
Expand Down Expand Up @@ -605,3 +607,7 @@ fetch('https:<your-graphql-api>', {
})
})
```
### When to use a string DocumentMode?
The `string` DocumentMode is useful when you want to reduce the bundle size of your application. You will get string literals instead of typed ASTs on the client.

0 comments on commit 00d5746

Please sign in to comment.