Skip to content

Commit 11b661b

Browse files
author
Armin Wiebigke
committed
Add documentation
1 parent 0bbd4ff commit 11b661b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

website/src/pages/docs/config-reference/schema-field.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,23 @@ const config: CodegenConfig = {
141141
export default config;
142142
```
143143

144+
Alternatively, you can specify a custom fetch function directly:
145+
146+
```ts {7}
147+
import { CodegenConfig } from '@graphql-codegen/cli';
148+
import { myCustomFetch } from './my-custom-fetch.ts'
149+
150+
const config: CodegenConfig = {
151+
schema: [
152+
{
153+
'http://localhost:3000/graphql': {
154+
customFetch: myCustomFetch,
155+
}
156+
}
157+
]
158+
};
159+
export default config;
160+
```
144161

145162
##### `method`
146163

0 commit comments

Comments
 (0)