We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df2b76f commit 008813fCopy full SHA for 008813f
packages/twenty-chrome-extension/codegen.ts
@@ -1,9 +1,17 @@
1
import { CodegenConfig } from '@graphql-codegen/cli';
2
3
const config: CodegenConfig = {
4
- schema: ['http://localhost:3000/graphql'],
+ schema: [{
5
+ [`${import.meta.env.VITE_SERVER_BASE_URL}/graphql`]: {
6
+ // some of the mutations and queries require authorization (people or companies)
7
+ // so to regenrate the schema with types we need to pass a auth token
8
+ headers: {
9
+ Authorization: 'YOUR-TOKEN-HERE',
10
+ },
11
+ }
12
+ }],
13
overwrite: true,
- documents: ['./src/**/*.ts', '!src/generated/**/*.*'],
14
+ documents: ['./src/**/*.ts', '!src/generated/**/*.*' ],
15
generates: {
16
'./src/generated/graphql.tsx': {
17
plugins: [
0 commit comments