We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7036e00 + 71c92d5 commit 1c70dafCopy full SHA for 1c70daf
website/src/pages/plugins/presets/preset-client.mdx
@@ -491,6 +491,29 @@ console.log(response.status)
491
console.log(await response.json())
492
```
493
494
+### Hashing algorithm
495
+
496
+To override the default hash algorithm of sha1 set `persistedDocuments.hashAlgorithm`
497
498
+```ts filename="codegen.ts" {10-12}
499
+import { type CodegenConfig } from '@graphql-codegen/cli'
500
501
+const config: CodegenConfig = {
502
+ schema: 'schema.graphql',
503
+ documents: ['src/**/*.tsx'],
504
+ generates: {
505
+ './src/gql/': {
506
+ preset: 'client',
507
+ presetConfig: {
508
+ persistedDocuments: {
509
+ hashAlgorithm: 'sha256'
510
+ }
511
512
513
514
+}
515
+```
516
517
### Normalized Caches (urql and Apollo Client)
518
519
Urql is a popular GraphQL client that utilizes a normalized cache.
0 commit comments