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 bdc1e7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,7 @@ 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
The `DocumentMode` option can be used to control how the plugin will generate the document nodes.
Expand Down Expand Up @@ -605,3 +605,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 as you will get string literals instead of typed ASTs. This is useful when your GraphQL client allows you to send a string literal as the query and you don't need to use the AST on the client.

0 comments on commit bdc1e7d

Please sign in to comment.